Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions test/functional/llmq-is-cl-conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,19 +106,26 @@ def test_chainlock_overrides_islock(self, test_block_conflict):

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

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

self.wait_for_best_chainlock(self.nodes[1], "%064x" % block.sha256)
for node in self.nodes:
self.wait_for_best_chainlock(node, "%064x" % block.sha256)

sync_blocks(self.nodes)

# At this point all nodes should be in sync and have the same "best chainlock"

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

for node in self.nodes:
Expand Down