Skip to content

Commit 991f14d

Browse files
committed
evo: prohibit new legacy scheme masternode registrations
This does not affect existing nodes but the basic scheme was activated in v19, since then we've had three major releases and enough time has passed, we should now prohibit registration of such masternodes.
1 parent abf96b5 commit 991f14d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/evo/deterministicmns.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1335,6 +1335,13 @@ bool CheckProRegTx(CDeterministicMNManager& dmnman, const CTransaction& tx, gsl:
13351335
return false;
13361336
}
13371337

1338+
const bool is_v23_active{DeploymentActiveAfter(pindexPrev, Params().GetConsensus(), Consensus::DEPLOYMENT_V23)};
1339+
1340+
// No longer allow legacy scheme masternode registration
1341+
if (is_v23_active && opt_ptx->nVersion < ProTxVersion::BasicBLS) {
1342+
return state.Invalid(TxValidationResult::TX_CONSENSUS, "bad-protx-version-disallowed");
1343+
}
1344+
13381345
// It's allowed to set addr to 0, which will put the MN into PoSe-banned state and require a ProUpServTx to be issues later
13391346
// If any of both is set, it must be valid however
13401347
if (!opt_ptx->netInfo->IsEmpty() && !CheckService(*opt_ptx, state)) {

0 commit comments

Comments
 (0)