Skip to content

Commit 22ac6ba

Browse files
UdjinM6codablock
authored andcommitted
Make sure chainlocks and blocks are propagated in llmq-is-cl-conflicts.py before moving to next steps (#3108)
* Make sure chainlocks and blocks are propagated in llmq-is-cl-conflicts.py before moving to next steps Add few comments here and there to clarify what's actually going on under the hood * Simplify
1 parent d6ca9a7 commit 22ac6ba

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

test/functional/llmq-is-cl-conflicts.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,26 @@ def test_chainlock_overrides_islock(self, test_block_conflict):
106106

107107
block = self.create_block(self.nodes[0], [rawtx2_obj])
108108
if test_block_conflict:
109+
# The block shouldn't be accepted/connected but it should be known to node 0 now
109110
submit_result = self.nodes[0].submitblock(ToHex(block))
110111
assert(submit_result == "conflict-tx-lock")
111112

112113
cl = self.create_chainlock(self.nodes[0].getblockcount() + 1, block.sha256)
113114
self.test_node.send_clsig(cl)
114115

115-
self.wait_for_best_chainlock(self.nodes[1], "%064x" % block.sha256)
116+
for node in self.nodes:
117+
self.wait_for_best_chainlock(node, "%064x" % block.sha256)
118+
119+
sync_blocks(self.nodes)
120+
121+
# At this point all nodes should be in sync and have the same "best chainlock"
116122

117-
# The block should get accepted now, and at the same time prune the conflicting ISLOCKs
118123
submit_result = self.nodes[1].submitblock(ToHex(block))
119124
if test_block_conflict:
125+
# Node 1 should receive the block from node 0 and should not accept it again via submitblock
120126
assert(submit_result == "duplicate")
121127
else:
128+
# The block should get accepted now, and at the same time prune the conflicting ISLOCKs
122129
assert(submit_result is None)
123130

124131
for node in self.nodes:

0 commit comments

Comments
 (0)