Skip to content
Merged
Show file tree
Hide file tree
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
13 changes: 11 additions & 2 deletions test/functional/feature_asset_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,17 @@ def test_asset_locks(self, node_wallet, node, pubkey):
extra_lock_tx = self.create_assetlock(coin, COIN, pubkey)
self.create_and_check_block([extra_lock_tx], expected_error = 'bad-cbtx-assetlocked-amount')

self.log.info("Mine a quorum...")
self.mine_quorum_2_nodes()
self.log.info("Mine IS quorum")
if len(self.nodes[0].quorum('list')['llmq_test_instantsend']) == 0:
self.mine_quorum(llmq_type_name='llmq_test_instantsend', expected_members=2, expected_connections=1, expected_contributions=2, expected_commitments=2, llmq_type=104)
else:
self.log.info("IS quorum exist")

self.log.info("Mine a platform quorum")
if len(self.nodes[0].quorum('list')['llmq_test_platform']) == 0:
self.mine_quorum_2_nodes()
else:
self.log.info("Platform quorum exist")

self.validate_credit_pool_balance(locked_1)

Expand Down
6 changes: 6 additions & 0 deletions test/functional/feature_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,13 @@ def run_test(self):
self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 4070908800)
self.wait_for_sporks_same()
self.log.info("Mine quorum for InstantSend")
(quorum_info_i_0, quorum_info_i_1) = self.mine_cycle_quorum()
self.log.info("Mine quorum for ChainLocks")
if len(self.nodes[0].quorum('list')['llmq_test']) == 0:
self.mine_quorum(llmq_type_name='llmq_test', llmq_type=104)
else:
self.log.info("Quorum `llmq_test` already exist")
self.nodes[0].sporkupdate("SPORK_19_CHAINLOCKS_ENABLED", 0)
self.wait_for_sporks_same()

Expand Down
6 changes: 6 additions & 0 deletions test/functional/p2p_instantsend.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ def set_test_params(self):
def run_test(self):
self.nodes[0].sporkupdate("SPORK_17_QUORUM_DKG_ENABLED", 0)
self.wait_for_sporks_same()
self.log.info("Mine quorum for InstantSend")
(quorum_info_i_0, quorum_info_i_1) = self.mine_cycle_quorum()
self.log.info("Mine quorum for ChainLocks")
if len(self.nodes[0].quorum('list')['llmq_test']) == 0:
self.mine_quorum(llmq_type_name='llmq_test', llmq_type=104)
else:
self.log.info("Quorum `llmq_test` already exist")

self.test_mempool_doublespend()
self.test_block_doublespend()
Expand Down
2 changes: 2 additions & 0 deletions test/functional/test_framework/test_framework.py
Original file line number Diff line number Diff line change
Expand Up @@ -1652,6 +1652,7 @@ def check_instantlock():
return node.getrawtransaction(txid, True)["instantlock"]
except:
return False
self.log.info(f"Expecting InstantLock for {txid}")
if self.wait_until(check_instantlock, timeout=timeout, sleep=1, do_assert=expected) and not expected:
raise AssertionError("waiting unexpectedly succeeded")

Expand All @@ -1662,6 +1663,7 @@ def check_chainlocked_block():
return block["confirmations"] > 0 and block["chainlock"]
except:
return False
self.log.info(f"Expecting ChainLock for {block_hash}")
if self.wait_until(check_chainlocked_block, timeout=timeout, sleep=0.1, do_assert=expected) and not expected:
raise AssertionError("waiting unexpectedly succeeded")

Expand Down
Loading