Skip to content

Commit 8baaba6

Browse files
committed
[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.
1 parent 9a0b2f4 commit 8baaba6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qa/rpc-tests/preciousblock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def run_test(self):
102102
assert_equal(self.nodes[2].getblockcount(), 6)
103103
hashL = self.nodes[2].getbestblockhash()
104104
print("Connect nodes and check no reorg occurs")
105-
node_sync_via_rpc(self.nodes[0:3])
105+
node_sync_via_rpc(self.nodes[1:3])
106106
connect_nodes_bi(self.nodes,1,2)
107107
connect_nodes_bi(self.nodes,0,2)
108108
assert_equal(self.nodes[0].getbestblockhash(), hashH)

0 commit comments

Comments
 (0)