diff options
| author | Russell Yanofsky <[email protected]> | 2016-11-11 15:38:59 -0500 |
|---|---|---|
| committer | Russell Yanofsky <[email protected]> | 2016-11-14 12:01:51 -0500 |
| commit | fd6bb700b77491689f0b5f34bdfb75764138f406 (patch) | |
| tree | dbc74c07347a35c29e4b677eab8a19299ecd2899 /qa/rpc-tests/test_framework/util.py | |
| parent | Merge #9124: Use better name for local variable to prevent -Wshadow compiler ... (diff) | |
| download | discoin-fd6bb700b77491689f0b5f34bdfb75764138f406.tar.xz discoin-fd6bb700b77491689f0b5f34bdfb75764138f406.zip | |
[qa] Improve sync_blocks error messages.
Diffstat (limited to 'qa/rpc-tests/test_framework/util.py')
| -rw-r--r-- | qa/rpc-tests/test_framework/util.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index b5ef0689b..2de4d5e30 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/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): return 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 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): """ |