diff --git a/src/llmq/commitment.h b/src/llmq/commitment.h index ba3153a69abfd..3cb02b93b50df 100644 --- a/src/llmq/commitment.h +++ b/src/llmq/commitment.h @@ -34,8 +34,6 @@ namespace llmq class CFinalCommitment { public: - static constexpr auto SPECIALTX_TYPE = TRANSACTION_PROVIDER_REGISTER; - static constexpr uint16_t LEGACY_BLS_NON_INDEXED_QUORUM_VERSION = 1; static constexpr uint16_t LEGACY_BLS_INDEXED_QUORUM_VERSION = 2; static constexpr uint16_t BASIC_BLS_NON_INDEXED_QUORUM_VERSION = 3; diff --git a/test/functional/feature_dip4_coinbasemerkleroots.py b/test/functional/feature_dip4_coinbasemerkleroots.py index ac45de11763de..d8e05cb2e0b43 100755 --- a/test/functional/feature_dip4_coinbasemerkleroots.py +++ b/test/functional/feature_dip4_coinbasemerkleroots.py @@ -45,6 +45,17 @@ class LLMQCoinbaseCommitmentsTest(DashTestFramework): def set_test_params(self): self.extra_args = [[ f'-testactivationheight=dip0008@{DIP0008_HEIGHT}', "-vbparams=testdummy:999999999999:999999999999" ]] * 4 self.set_dash_test_params(4, 3, extra_args = self.extra_args) + + def remove_masternode(self, idx): + mn = self.mninfo[idx] + rawtx = self.nodes[0].createrawtransaction([{"txid": mn.collateral_txid, "vout": mn.collateral_vout}], {self.nodes[0].getnewaddress(): 999.9999}) + rawtx = self.nodes[0].signrawtransactionwithwallet(rawtx) + self.nodes[0].sendrawtransaction(rawtx["hex"]) + self.generate(self.nodes[0], 1) + self.mninfo.remove(mn) + + self.log.info("Removed masternode %d", idx) + def run_test(self): # No IS or Chainlocks in this test self.bump_mocktime(1) diff --git a/test/functional/test_framework/test_framework.py b/test/functional/test_framework/test_framework.py index 3ccf819fd9cf7..99c63cdd4eb33 100755 --- a/test/functional/test_framework/test_framework.py +++ b/test/functional/test_framework/test_framework.py @@ -1431,16 +1431,6 @@ def prepare_masternode(self, idx): self.log.info("Prepared MN %d: collateral_txid=%s, collateral_vout=%d, protxHash=%s" % (idx, txid, collateral_vout, proTxHash)) - def remove_masternode(self, idx): - mn = self.mninfo[idx] - rawtx = self.nodes[0].createrawtransaction([{"txid": mn.collateral_txid, "vout": mn.collateral_vout}], {self.nodes[0].getnewaddress(): 999.9999}) - rawtx = self.nodes[0].signrawtransactionwithwallet(rawtx) - self.nodes[0].sendrawtransaction(rawtx["hex"]) - self.generate(self.nodes[0], 1) - self.mninfo.remove(mn) - - self.log.info("Removed masternode %d", idx) - def prepare_datadirs(self): # stop faucet node so that we can copy the datadir self.stop_node(0) @@ -1461,10 +1451,6 @@ def start_masternodes(self): self.add_nodes(self.mn_count) executor = ThreadPoolExecutor(max_workers=20) - def do_connect(idx): - # Connect to the control node only, masternodes should take care of intra-quorum connections themselves - self.connect_nodes(self.mninfo[idx].nodeIdx, 0) - jobs = [] # start up nodes in parallel @@ -1479,9 +1465,9 @@ def do_connect(idx): executor.shutdown() - # connect nodes + # Connect to the control node only, masternodes should take care of intra-quorum connections themselves for idx in range(0, self.mn_count): - do_connect(idx) + self.connect_nodes(self.mninfo[idx].nodeIdx, 0) def start_masternode(self, mninfo, extra_args=None): args = ['-masternodeblsprivkey=%s' % mninfo.keyOperator] + self.extra_args[mninfo.nodeIdx] @@ -1525,16 +1511,16 @@ def setup_network(self): # non-masternodes where disconnected from the control node during prepare_datadirs, # let's reconnect them back to make sure they receive updates - num_simple_nodes = self.num_nodes - self.mn_count - 1 - for i in range(0, num_simple_nodes): - self.connect_nodes(i+1, 0) + num_simple_nodes = self.num_nodes - self.mn_count + for i in range(1, num_simple_nodes): + self.connect_nodes(i, 0) self.start_masternodes() self.bump_mocktime(1) self.generate(self.nodes[0], 1) - for i in range(0, num_simple_nodes): - force_finish_mnsync(self.nodes[i + 1]) + for i in range(1, num_simple_nodes): + force_finish_mnsync(self.nodes[i]) # Enable InstantSend (including block filtering) and ChainLocks by default self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0) diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index 54578d6ccedd2..59a4d663cc2f3 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -526,9 +526,7 @@ def force_finish_mnsync(node): Masternodes won't accept incoming connections while IsSynced is false. Force them to switch to this state to speed things up. """ - while True: - if node.mnsync("status")['IsSynced']: - break + while not node.mnsync("status")['IsSynced']: node.mnsync("next") # Transaction/Block functions