Browse Source

[qa] Improve sync_blocks error messages.

0.14
Russell Yanofsky 8 years ago
parent
commit
fd6bb700b7
  1. 6
      qa/rpc-tests/test_framework/util.py

6
qa/rpc-tests/test_framework/util.py

@ -132,10 +132,12 @@ def sync_blocks(rpc_connections, *, wait=1, timeout=60):
if tips == [tips[0]] * len(tips): if tips == [tips[0]] * len(tips):
return return
if heights == [heights[0]] * len(heights): if heights == [heights[0]] * len(heights):
raise AssertionError("Block sync failed: (Hashes don't match)") raise AssertionError("Block sync failed, mismatched block hashes:{}".format(
"".join("\n {!r}".format(tip) for tip in tips)))
timeout -= wait timeout -= wait
maxheight = max(heights) maxheight = max(heights)
raise AssertionError("Block sync failed with heights: {}".format(heights)) raise AssertionError("Block sync to height {} timed out:{}".format(
maxheight, "".join("\n {!r}".format(tip) for tip in tips)))
def sync_chain(rpc_connections, *, wait=1, timeout=60): def sync_chain(rpc_connections, *, wait=1, timeout=60):
""" """

Loading…
Cancel
Save