Skip to content

Commit

Permalink
adapations for feature_llmq_connections.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ogabrielides committed Oct 30, 2023
1 parent d5c0983 commit bb9a118
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/llmq/quorums.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
15 changes: 14 additions & 1 deletion test/functional/feature_llmq_connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bb9a118

Please sign in to comment.