Skip to content

Commit 7943b13

Browse files
committed
[qa] Avoid 2 list comprehensions in sync_blocks
1 parent 05e57cc commit 7943b13

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qa/rpc-tests/test_framework/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ def sync_blocks(rpc_connections, *, wait=1, timeout=60):
134134
while cur_time <= start_time + timeout:
135135
tips = [r.waitforblockheight(maxheight, int(wait * 1000)) for r in rpc_connections]
136136
heights = [t["height"] for t in tips]
137-
if tips == [tips[0]] * len(tips):
137+
if all(t == tips[0] for t in tips):
138138
return
139-
if heights == [heights[0]] * len(heights):
139+
if all(h == heights[0] for h in heights):
140140
raise AssertionError("Block sync failed, mismatched block hashes:{}".format(
141141
"".join("\n {!r}".format(tip) for tip in tips)))
142142
maxheight = max(heights)

0 commit comments

Comments
 (0)