diff options
| author | Patrick Lodder <[email protected]> | 2015-08-23 15:58:47 +0200 |
|---|---|---|
| committer | Patrick Lodder <[email protected]> | 2015-08-23 15:58:47 +0200 |
| commit | 248dbdd1218f7f31e719112573c15126269a5a60 (patch) | |
| tree | 1088457dc66b0dc20f9b07ce25fe4e93031cab04 /src/chainparams.cpp | |
| parent | Merge pull request #1247 from rnicoll/1.10-attribution (diff) | |
| download | discoin-248dbdd1218f7f31e719112573c15126269a5a60.tar.xz discoin-248dbdd1218f7f31e719112573c15126269a5a60.zip | |
[auxpow] Check for auxpow fork strictly
Disallow any auxpow block before the blockheight where auxpow gets enabled.
For consistency, this also re-enables legacy headers on regtest.
Diffstat (limited to 'src/chainparams.cpp')
| -rw-r--r-- | src/chainparams.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/chainparams.cpp b/src/chainparams.cpp index bb0350b11..8ce5318d0 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -50,6 +50,7 @@ public: consensus.nAuxpowChainId = 0x0062; // 98 - Josh Wise! consensus.fStrictChainId = true; consensus.fAllowLegacyBlocks = true; + consensus.fAllowAuxPow = false; consensus.nHeightEffective = 0; consensus.fDigishieldDifficultyCalculation = false; consensus.nCoinbaseMaturity = 30; @@ -66,6 +67,7 @@ public: auxpowConsensus = digishieldConsensus; auxpowConsensus.nHeightEffective = 371337; auxpowConsensus.fAllowLegacyBlocks = false; + auxpowConsensus.fAllowAuxPow = true; // Assemble the binary search tree of consensus parameters pConsensusRoot = &digishieldConsensus; @@ -188,6 +190,7 @@ public: consensus.fStrictChainId = false; consensus.nHeightEffective = 0; consensus.fAllowLegacyBlocks = true; + consensus.fAllowAuxPow = false; // Reset links before we copy parameters consensus.pLeft = NULL; @@ -213,6 +216,7 @@ public: auxpowConsensus.nHeightEffective = 158100; auxpowConsensus.fPowAllowDigishieldMinDifficultyBlocks = true; auxpowConsensus.fAllowLegacyBlocks = false; + auxpowConsensus.fAllowAuxPow = true; // Assemble the binary search tree of parameters pConsensusRoot = &digishieldConsensus; @@ -286,7 +290,8 @@ public: consensus.nPowTargetSpacing = 1; // regtest: 1 second blocks consensus.powLimit = uint256S("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); // ~uint256(0) >> 1; consensus.fStrictChainId = true; - consensus.fAllowLegacyBlocks = false; // Never allow legacy blocks on RegTest + consensus.fAllowLegacyBlocks = true; + consensus.fAllowAuxPow = false; consensus.fSimplifiedRewards = true; consensus.nCoinbaseMaturity = 60; // For easier testability in RPC tests @@ -300,6 +305,8 @@ public: digishieldConsensus.fDigishieldDifficultyCalculation = true; auxpowConsensus = digishieldConsensus; + auxpowConsensus.fAllowLegacyBlocks = false; + auxpowConsensus.fAllowAuxPow = true; auxpowConsensus.nHeightEffective = 20; // Assemble the binary search tree of parameters |