aboutsummaryrefslogtreecommitdiff
path: root/src/versionbits.h
diff options
context:
space:
mode:
authorAnthony Towns <aj@erisian.com.au>2021-03-06 18:18:49 +1000
committerAnthony Towns <aj@erisian.com.au>2021-04-12 11:14:49 +1000
commit73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8 (patch)
treed187f08c276e57a617c3e9eee6c635890e3873a6 /src/versionbits.h
parent9e6b65f6fa205eee5c3b99343988adcb8d320460 (diff)
downloadbitcoin-73d4a706393e6dbd6b6d6b6428f8d3233ac0a2d8.tar.xz
versionbits: Add support for delayed activation
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 6df1db8814..634a848ef5 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;