Browse Source

[attster] Remove while true and wait instead (#411)

Ali Behjati 3 years ago
parent
commit
df3297e430

+ 1 - 1
solana/pyth2wormhole/Cargo.lock

@@ -2710,7 +2710,7 @@ dependencies = [
 
 [[package]]
 name = "pyth2wormhole-client"
-version = "1.1.0"
+version = "1.1.1"
 dependencies = [
  "borsh",
  "clap 3.1.18",

+ 1 - 1
solana/pyth2wormhole/client/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "pyth2wormhole-client"
-version = "1.1.0"
+version = "1.1.1"
 edition = "2018"
 
 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

+ 2 - 3
third_party/pyth/p2w_autoattest.py

@@ -252,8 +252,7 @@ while True:
     )
 
     # Wait for an unexpected process exit
-    while p2w_client_process.poll() is None:
-        pass
+    retcode = p2w_client_process.wait()
 
     # Yell if the supposedly non-stop attestation process exits
-    logging.warn(f"pyth2wormhole-client stopped unexpectedly with code {p2w_client_process.retcode}")
+    logging.warn(f"pyth2wormhole-client stopped unexpectedly with code {retcode}")