diff options
author | Matt Corallo <git@bluematt.me> | 2016-12-19 00:47:08 -0800 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-01-04 15:56:08 -0500 |
commit | 8baaba653ef67097eb3d3a4b4d25f907111830b1 (patch) | |
tree | 0d42670b935a5e1b6cf0868c8f0c5972fb58f20c /qa/rpc-tests/preciousblock.py | |
parent | 9a0b2f4c5b5cbdf37c68710ab8af877bd322d99c (diff) | |
download | bitcoin-8baaba653ef67097eb3d3a4b4d25f907111830b1.tar.xz |
[qa] Avoid race in preciousblock test.
If node 0 is sufficiently fast to announce its block to node 1,
node 1 might already have the block by the time the
node_sync_via_rpc loop gets around to node 1, resulting in the
submitblock result "duplicate-inconclusive" as node 1 has the block,
but prefers an alternate chain.
Diffstat (limited to 'qa/rpc-tests/preciousblock.py')
-rwxr-xr-x | qa/rpc-tests/preciousblock.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qa/rpc-tests/preciousblock.py b/qa/rpc-tests/preciousblock.py index f43160e19a..a806294648 100755 --- a/qa/rpc-tests/preciousblock.py +++ b/qa/rpc-tests/preciousblock.py @@ -102,7 +102,7 @@ class PreciousTest(BitcoinTestFramework): assert_equal(self.nodes[2].getblockcount(), 6) hashL = self.nodes[2].getbestblockhash() print("Connect nodes and check no reorg occurs") - node_sync_via_rpc(self.nodes[0:3]) + node_sync_via_rpc(self.nodes[1:3]) connect_nodes_bi(self.nodes,1,2) connect_nodes_bi(self.nodes,0,2) assert_equal(self.nodes[0].getbestblockhash(), hashH) |