diff options
Diffstat (limited to 'src/consensus/params.h')
| -rw-r--r-- | src/consensus/params.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/consensus/params.h b/src/consensus/params.h index 6c3a201f4..ff90b1304 100644 --- a/src/consensus/params.h +++ b/src/consensus/params.h @@ -75,6 +75,24 @@ struct Params { int64_t DifficultyAdjustmentInterval() const { return nPowTargetTimespan / nPowTargetSpacing; } uint256 nMinimumChainWork; uint256 defaultAssumeValid; + + /** Auxpow parameters */ + int32_t nAuxpowChainId; + int nAuxpowStartHeight; + bool fStrictChainId; + int nLegacyBlocksBefore; // -1 for "always allow" + + /** + * Check whether or not to allow legacy blocks at the given height. + * @param nHeight Height of the block to check. + * @return True if it is allowed to have a legacy version. + */ + bool AllowLegacyBlocks(unsigned nHeight) const + { + if (nLegacyBlocksBefore < 0) + return true; + return static_cast<int> (nHeight) < nLegacyBlocksBefore; + } }; } // namespace Consensus |