mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
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
This commit is contained in:
parent
d6ca9a78ef
commit
22ac6ba4ef
@ -106,19 +106,26 @@ class LLMQ_IS_CL_Conflicts(DashTestFramework):
|
||||
|
||||
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:
|
||||
|
Loading…
Reference in New Issue
Block a user