diff --git a/src/llmq/context.cpp b/src/llmq/context.cpp index b460da82cc..aee90f9f8b 100644 --- a/src/llmq/context.cpp +++ b/src/llmq/context.cpp @@ -44,8 +44,8 @@ LLMQContext::LLMQContext(CChainState& chainstate, CConnman& connman, CDeterminis llmq::quorumInstantSendManager = std::make_unique(*llmq::chainLocksHandler, chainstate, connman, *qman, *sigman, *shareman, sporkman, mempool, mn_sync, peerman, is_masternode, unit_tests, wipe); return llmq::quorumInstantSendManager.get(); }()}, - ehfSignalsHandler{std::make_unique(chainstate, mnhfman, *sigman, *shareman, mempool, - *qman, sporkman, peerman)} + ehfSignalsHandler{ + std::make_unique(chainstate, mnhfman, *sigman, *shareman, mempool, *qman, peerman)} { } diff --git a/src/llmq/ehf_signals.cpp b/src/llmq/ehf_signals.cpp index bf84b8d65a..b5ec7a1e33 100644 --- a/src/llmq/ehf_signals.cpp +++ b/src/llmq/ehf_signals.cpp @@ -16,7 +16,6 @@ #include // g_txindex #include #include -#include #include #include @@ -25,14 +24,13 @@ namespace llmq { CEHFSignalsHandler::CEHFSignalsHandler(CChainState& chainstate, CMNHFManager& mnhfman, CSigningManager& sigman, CSigSharesManager& shareman, CTxMemPool& mempool, const CQuorumManager& qman, - const CSporkManager& sporkman, const std::unique_ptr& peerman) : + const std::unique_ptr& peerman) : chainstate(chainstate), mnhfman(mnhfman), sigman(sigman), shareman(shareman), mempool(mempool), qman(qman), - sporkman(sporkman), m_peerman(peerman) { sigman.RegisterRecoveredSigsListener(this); @@ -48,7 +46,7 @@ void CEHFSignalsHandler::UpdatedBlockTip(const CBlockIndex* const pindexNew, boo { if (!DeploymentActiveAfter(pindexNew, Params().GetConsensus(), Consensus::DEPLOYMENT_V20)) return; - if (!is_masternode || (Params().IsTestChain() && !sporkman.IsSporkActive(SPORK_24_TEST_EHF))) { + if (!is_masternode) { return; } diff --git a/src/llmq/ehf_signals.h b/src/llmq/ehf_signals.h index 3629ce2873..22a01cf3fe 100644 --- a/src/llmq/ehf_signals.h +++ b/src/llmq/ehf_signals.h @@ -12,7 +12,6 @@ class CBlockIndex; class CChainState; class CMNHFManager; -class CSporkManager; class CTxMemPool; class PeerManager; @@ -31,7 +30,6 @@ private: CSigSharesManager& shareman; CTxMemPool& mempool; const CQuorumManager& qman; - const CSporkManager& sporkman; const std::unique_ptr& m_peerman; /** @@ -42,7 +40,7 @@ private: public: explicit CEHFSignalsHandler(CChainState& chainstate, CMNHFManager& mnhfman, CSigningManager& sigman, CSigSharesManager& shareman, CTxMemPool& mempool, const CQuorumManager& qman, - const CSporkManager& sporkman, const std::unique_ptr& peerman); + const std::unique_ptr& peerman); ~CEHFSignalsHandler(); diff --git a/src/spork.h b/src/spork.h index 632e30d54a..d30afe3bba 100644 --- a/src/spork.h +++ b/src/spork.h @@ -42,7 +42,7 @@ enum SporkId : int32_t { SPORK_19_CHAINLOCKS_ENABLED = 10018, SPORK_21_QUORUM_ALL_CONNECTED = 10020, SPORK_23_QUORUM_POSE = 10022, - SPORK_24_TEST_EHF = 10023, + // SPORK_24_DEPRECATED = 10023, SPORK_INVALID = -1, }; @@ -76,7 +76,6 @@ struct CSporkDef MAKE_SPORK_DEF(SPORK_19_CHAINLOCKS_ENABLED, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_21_QUORUM_ALL_CONNECTED, 4070908800ULL), // OFF MAKE_SPORK_DEF(SPORK_23_QUORUM_POSE, 4070908800ULL), // OFF - MAKE_SPORK_DEF(SPORK_24_TEST_EHF, 4070908800ULL), // OFF }; #undef MAKE_SPORK_DEF diff --git a/test/functional/feature_mnehf.py b/test/functional/feature_mnehf.py index 865e99fa54..23b9be066a 100755 --- a/test/functional/feature_mnehf.py +++ b/test/functional/feature_mnehf.py @@ -5,6 +5,7 @@ # file COPYING or http://www.opensource.org/licenses/mit-license.php. import struct +import time from io import BytesIO from test_framework.authproxy import JSONRPCException @@ -45,15 +46,6 @@ class MnehfTest(DashTestFramework): for i in range(1, self.num_nodes): self.connect_nodes(i, 0) - def slowly_generate_batch(self, amount): - self.log.info(f"Slowly generate {amount} blocks") - while amount > 0: - self.log.info(f"Generating batch of blocks {amount} left") - next = min(10, amount) - amount -= next - self.bump_mocktime(next) - self.nodes[1].generate(next) - self.sync_all() def create_mnehf(self, versionBit, pubkey=None): # request ID = sha256("mnhf", versionBit) @@ -241,26 +233,18 @@ class MnehfTest(DashTestFramework): node.generate(1) self.sync_blocks() self.restart_all_nodes(params=[self.mocktime, self.mocktime + 1000000]) + self.check_fork('defined') + self.mine_quorum() - - ehf_tx_new_start = self.create_mnehf(28, pubkey) - - self.log.info("Test spork 24 (EHF)") - self.check_fork('defined') - self.nodes[0].sporkupdate("SPORK_24_TEST_EHF", 0) - self.wait_for_sporks_same() - self.check_fork('defined') - self.log.info("Mine one block and ensure EHF tx for the new deployment is mined") - ehf_tx_sent = self.send_tx(ehf_tx_new_start) - tip_blockhash = node.generate(1)[0] - self.sync_all() - block = node.getblock(tip_blockhash) - assert ehf_tx_sent in block['tx'] - - self.check_fork('defined') - self.slowly_generate_batch(4 * 4) + self.log.info("Waiting a bit to make EHF activating...") + self.mine_quorum() + for _ in range(4 * 4): + time.sleep(1) + self.bump_mocktime(1) + self.nodes[1].generate(1) + self.sync_all() self.check_fork('active')