From bb9a118849c947a0dc6f741b940be6be85c263dd Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Tue, 31 Oct 2023 00:43:33 +0200 Subject: [PATCH] adapations for feature_llmq_connections.py --- src/llmq/quorums.cpp | 5 +---- test/functional/feature_llmq_connections.py | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/llmq/quorums.cpp b/src/llmq/quorums.cpp index dd2ec5a7376c5c..a445d756086188 100644 --- a/src/llmq/quorums.cpp +++ b/src/llmq/quorums.cpp @@ -327,10 +327,7 @@ void CQuorumManager::CheckQuorumConnections(const Consensus::LLMQParams& llmqPar } const auto myProTxHash = WITH_LOCK(activeMasternodeInfoCs, return activeMasternodeInfo.proTxHash); - // FIXME: should only check llmqTypeDIP0024InstantSend here but feature_llmq_connections.py is broken - // bool isISType = llmqParams.type == Params().GetConsensus().llmqTypeDIP0024InstantSend; - bool isISType = llmqParams.type == Consensus::LLMQType::LLMQ_TEST_INSTANTSEND || - llmqParams.type == Params().GetConsensus().llmqTypeDIP0024InstantSend; + bool isISType = llmqParams.type == Params().GetConsensus().llmqTypeDIP0024InstantSend; bool watchOtherISQuorums = isISType && !myProTxHash.IsNull() && ranges::any_of(lastQuorums, [&myProTxHash](const auto& old_quorum){ diff --git a/test/functional/feature_llmq_connections.py b/test/functional/feature_llmq_connections.py index 5892549be71276..fd080af85a7e4e 100755 --- a/test/functional/feature_llmq_connections.py +++ b/test/functional/feature_llmq_connections.py @@ -87,13 +87,26 @@ def run_test(self): break assert removed # no way we removed none + self.nodes[0].sporkupdate("SPORK_23_QUORUM_POSE", 4070908800) + self.wait_for_sporks_same() + + self.activate_v19(expected_activation_height=900) + self.log.info("Activated v19 at height:" + str(self.nodes[0].getblockcount())) + self.move_to_next_cycle() + self.log.info("Cycle H height:" + str(self.nodes[0].getblockcount())) + self.move_to_next_cycle() + self.log.info("Cycle H+C height:" + str(self.nodes[0].getblockcount())) + self.move_to_next_cycle() + self.log.info("Cycle H+2C height:" + str(self.nodes[0].getblockcount())) + self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103) + self.log.info("check that inter-quorum masternode conections are added") added = False for mn in self.mninfo: if len(mn.node.quorum("memberof", mn.proTxHash)) > 0: try: with mn.node.assert_debug_log(['adding mn inter-quorum connections']): - self.mine_quorum() + self.mine_cycle_quorum(llmq_type_name='llmq_test_dip0024', llmq_type=103) added = True except: pass # it's ok to not add connections sometimes