Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: make llmq_test_instantsend great again #5832

Merged
merged 2 commits into from
Jan 19, 2024
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
7 changes: 5 additions & 2 deletions src/llmq/options.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,13 @@ bool IsQuorumTypeEnabledInternal(Consensus::LLMQType llmqType, gsl::not_null<con
return true;
case Consensus::LLMQType::LLMQ_50_60:
if (Params().NetworkIDString() == CBaseChainParams::TESTNET) return true;
// fall through
case Consensus::LLMQType::LLMQ_TEST_INSTANTSEND:
return !fDIP0024IsActive;

case Consensus::LLMQType::LLMQ_TEST_INSTANTSEND:
if (!fDIP0024IsActive) return true;

return consensusParams.llmqTypeDIP0024InstantSend == Consensus::LLMQType::LLMQ_TEST_INSTANTSEND;

case Consensus::LLMQType::LLMQ_TEST:
case Consensus::LLMQType::LLMQ_TEST_PLATFORM:
case Consensus::LLMQType::LLMQ_400_60:
Expand Down
15 changes: 2 additions & 13 deletions test/functional/feature_asset_locks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@

class AssetLocksTest(DashTestFramework):
def set_test_params(self):
self.set_dash_test_params(6, 4, evo_count=3)
self.set_dash_test_params(5, 3, [["-whitelist=127.0.0.1", "-llmqtestinstantsenddip0024=llmq_test_instantsend"]] * 5, evo_count=3)

def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
Expand Down Expand Up @@ -241,21 +241,10 @@ def run_test(self):
self.activate_v19(expected_activation_height=900)
self.log.info("Activated v19 at height:" + str(node.getblockcount()))

# TODO: need to refactor this part to common code
# enabling instantsend -> 3 rotating quorums -> new 103 quorum
# with following dynamically adding evo nodes one-by-one seems
# as little too much complex for functional test (each which use Evo nodes)
self.nodes[0].sporkupdate("SPORK_2_INSTANTSEND_ENABLED", 0)
self.wait_for_sporks_same()

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.mine_quorum(llmq_type_name='llmq_test_instantsend', llmq_type=104)

for i in range(3):
self.dynamically_add_masternode(evo=True)
Expand Down
Loading