Skip to content
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
6 changes: 6 additions & 0 deletions doc/release-notes-6140.md
Original file line number Diff line number Diff line change
@@ -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.
10 changes: 10 additions & 0 deletions src/spork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down