Skip to content

Commit c2db294

Browse files
authored
fix: rename SPORK_24_EHF to SPORK_24_TEST_EHF, make sure it has no effect on mainnet (dashpay#5691)
## Issue being fixed or feature implemented Be more explicit about the fact that spork24 is for non-mainnet only, enforce it in code. NOTE: I know we have EHF signalling disabled for mainnet in v20 but I think it still makes sense to make sure spork24 condition won't slip into mainnet in some future version accidentally. ## What was done? pls see individual commits ## How Has This Been Tested? ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
1 parent 704c594 commit c2db294

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

src/llmq/ehf_signals.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ CEHFSignalsHandler::~CEHFSignalsHandler()
4444

4545
void CEHFSignalsHandler::UpdatedBlockTip(const CBlockIndex* const pindexNew)
4646
{
47-
if (!fMasternodeMode || !llmq::utils::IsV20Active(pindexNew) || !sporkman.IsSporkActive(SPORK_24_EHF)) {
47+
if (!fMasternodeMode || !llmq::utils::IsV20Active(pindexNew) || (Params().IsTestChain() && !sporkman.IsSporkActive(SPORK_24_TEST_EHF))) {
4848
return;
4949
}
5050

src/spork.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ enum SporkId : int32_t {
4141
SPORK_19_CHAINLOCKS_ENABLED = 10018,
4242
SPORK_21_QUORUM_ALL_CONNECTED = 10020,
4343
SPORK_23_QUORUM_POSE = 10022,
44-
SPORK_24_EHF = 10023,
44+
SPORK_24_TEST_EHF = 10023,
4545

4646
SPORK_INVALID = -1,
4747
};
@@ -75,7 +75,7 @@ struct CSporkDef
7575
MAKE_SPORK_DEF(SPORK_19_CHAINLOCKS_ENABLED, 4070908800ULL), // OFF
7676
MAKE_SPORK_DEF(SPORK_21_QUORUM_ALL_CONNECTED, 4070908800ULL), // OFF
7777
MAKE_SPORK_DEF(SPORK_23_QUORUM_POSE, 4070908800ULL), // OFF
78-
MAKE_SPORK_DEF(SPORK_24_EHF, 4070908800ULL), // OFF
78+
MAKE_SPORK_DEF(SPORK_24_TEST_EHF, 4070908800ULL), // OFF
7979
};
8080
#undef MAKE_SPORK_DEF
8181
extern std::unique_ptr<CSporkManager> sporkManager;

test/functional/feature_mnehf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def run_test(self):
259259

260260
self.log.info("activate MN_RR also by enabling spork 24")
261261
assert_equal(get_bip9_details(node, 'mn_rr')['status'], 'defined')
262-
self.nodes[0].sporkupdate("SPORK_24_EHF", 0)
262+
self.nodes[0].sporkupdate("SPORK_24_TEST_EHF", 0)
263263
self.wait_for_sporks_same()
264264

265265
self.check_fork('defined')

test/functional/test_framework/test_framework.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ def activate_v20(self, expected_activation_height=None):
11281128
self.activate_by_name('v20', expected_activation_height)
11291129

11301130
def activate_mn_rr(self, expected_activation_height=None):
1131-
self.nodes[0].sporkupdate("SPORK_24_EHF", 0)
1131+
self.nodes[0].sporkupdate("SPORK_24_TEST_EHF", 0)
11321132
self.wait_for_sporks_same()
11331133
mn_rr_height = 0
11341134
while mn_rr_height == 0:

0 commit comments

Comments
 (0)