aboutsummaryrefslogtreecommitdiff
path: root/qa/rpc-tests
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2016-11-11 15:43:15 -0500
committerRussell Yanofsky <russ@yanofsky.org>2016-11-14 12:02:33 -0500
commit7943b13ab3e005e1dd5c277efdbc06088d89f6de (patch)
tree5aac185db80d822562c06cfebf24e22350c92214 /qa/rpc-tests
parent05e57ccd746b2e14699d2b1980927f30070cb3ad (diff)
downloadbitcoin-7943b13ab3e005e1dd5c277efdbc06088d89f6de.tar.xz
[qa] Avoid 2 list comprehensions in sync_blocks
Diffstat (limited to 'qa/rpc-tests')
-rw-r--r--qa/rpc-tests/test_framework/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py
index 01bde0c84d..bf13b7fd84 100644
--- a/qa/rpc-tests/test_framework/util.py
+++ b/qa/rpc-tests/test_framework/util.py
@@ -134,9 +134,9 @@ def sync_blocks(rpc_connections, *, wait=1, timeout=60):
while cur_time <= start_time + timeout:
tips = [r.waitforblockheight(maxheight, int(wait * 1000)) for r in rpc_connections]
heights = [t["height"] for t in tips]
- if tips == [tips[0]] * len(tips):
+ if all(t == tips[0] for t in tips):
return
- if heights == [heights[0]] * len(heights):
+ if all(h == heights[0] for h in heights):
raise AssertionError("Block sync failed, mismatched block hashes:{}".format(
"".join("\n {!r}".format(tip) for tip in tips)))
maxheight = max(heights)