Skip to content

Commit 943495d

Browse files
mmsqeHuangYi
andauthored
Problem: fail to benchmark for one validator only (#1602)
* Problem: fail to benchmark for one validator only * add comment --------- Co-authored-by: HuangYi <[email protected]>
1 parent b6491ec commit 943495d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

testground/benchmark/benchmark/stateless.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,11 @@ def wait_for_peers(home: Path):
396396
cfg = tomlkit.parse((home / "config" / "config.toml").read_text())
397397
peers = cfg["p2p"]["persistent_peers"]
398398
for peer in peers.split(","):
399-
host = peer.split("@", 1)[1].split(":", 1)[0]
399+
parts = peer.split("@", 1)
400+
if len(parts) < 2:
401+
# ignore invalid or empty peer
402+
continue
403+
host = parts[1].split(":", 1)[0]
400404
print("wait for peer to be ready:", host)
401405
wait_for_port(ECHO_SERVER_PORT, host=host, timeout=2400)
402406

0 commit comments

Comments
 (0)