Skip to content

Commit

Permalink
[qa] Avoid race in preciousblock test.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
TheBlueMatt committed Jan 4, 2017
1 parent 9a0b2f4 commit 8baaba6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qa/rpc-tests/preciousblock.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def run_test(self):
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)
Expand Down

0 comments on commit 8baaba6

Please sign in to comment.