diff --git a/doc/release-notes-6140.md b/doc/release-notes-6140.md new file mode 100644 index 0000000000..0ae9324b95 --- /dev/null +++ b/doc/release-notes-6140.md @@ -0,0 +1,6 @@ +Mainnet Spork Hardening +----------------------- + +This version hardens all Sporks on mainnet. Sporks remain in effect on all devnets and testnet; however, on mainnet, +the value of all sporks are hard coded to 0, or 1 for SPORK_21_QUORUM_ALL_CONNECTED. These hardened values match the +active values historically used on mainnet, so there is no change in the network's functionality. diff --git a/src/spork.cpp b/src/spork.cpp index 3d489bc76f..6fd7a6388b 100644 --- a/src/spork.cpp +++ b/src/spork.cpp @@ -262,6 +262,16 @@ bool CSporkManager::IsSporkActive(SporkId nSporkID) const SporkValue CSporkManager::GetSporkValue(SporkId nSporkID) const { + // Harden all sporks on Mainnet + if (!Params().IsTestChain()) { + switch (nSporkID) { + case SPORK_21_QUORUM_ALL_CONNECTED: + return 1; + default: + return 0; + } + } + LOCK(cs); if (auto opt_sporkValue = SporkValueIfActive(nSporkID)) {