aboutsummaryrefslogtreecommitdiff
path: root/src/versionbits.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-03-06 18:18:49 +1000
committerAndrew Chow <achow101-github@achow101.com>2021-04-15 12:03:27 -0400
commit4cab84cfdfc98cd10462681b5eb0fbbc08afd2a7 (patch)
tree5161469f332752ee172989c7012ad85741950cd9 /src/versionbits.h
parentf9517e6014ccfe91d5a77e2bacca928bdce7c285 (diff)
downloadbitcoin-4cab84cfdfc98cd10462681b5eb0fbbc08afd2a7.tar.xz
versionbits: Add support for delayed activation
Github-Pull: #21377 Rebased-From: 73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8
Diffstat (limited to 'src/versionbits.h')
-rw-r--r--src/versionbits.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/versionbits.h b/src/versionbits.h
index b02f848b67..faf09343ea 100644
--- a/src/versionbits.h
+++ b/src/versionbits.h
@@ -25,7 +25,7 @@ static const int32_t VERSIONBITS_NUM_BITS = 29;
enum class ThresholdState {
DEFINED, // First state that each softfork starts out as. The genesis block is by definition in this state for each deployment.
STARTED, // For blocks past the starttime.
- LOCKED_IN, // For one retarget period after the first retarget period with STARTED blocks of which at least threshold have the associated bit set in nVersion.
+ LOCKED_IN, // For at least one retarget period after the first retarget period with STARTED blocks of which at least threshold have the associated bit set in nVersion, until min_activation_height is reached.
ACTIVE, // For all blocks after the LOCKED_IN retarget period (final state)
FAILED, // For all blocks once the first retarget period after the timeout time is hit, if LOCKED_IN wasn't already reached (final state)
};
@@ -57,6 +57,7 @@ protected:
virtual bool Condition(const CBlockIndex* pindex, const Consensus::Params& params) const =0;
virtual int64_t BeginTime(const Consensus::Params& params) const =0;
virtual int64_t EndTime(const Consensus::Params& params) const =0;
+ virtual int MinActivationHeight(const Consensus::Params& params) const { return 0; }
virtual int Period(const Consensus::Params& params) const =0;
virtual int Threshold(const Consensus::Params& params) const =0;