diff options
| author | Max K. <[email protected]> | 2015-08-26 21:54:10 +0200 |
|---|---|---|
| committer | Max K. <[email protected]> | 2015-08-26 21:54:10 +0200 |
| commit | 442c82da4adbf4573289e65109a5f789f2d29cf3 (patch) | |
| tree | 18d4968b9a6d80f32f7a2c4f0cf201c128913b9c /src/main.cpp | |
| parent | Merge pull request #1264 from patricklodder/1.10-auxrpc-no-bip22 (diff) | |
| parent | fix rest.py test: cannot mine an auxpow block at height 1 (diff) | |
| download | discoin-442c82da4adbf4573289e65109a5f789f2d29cf3.tar.xz discoin-442c82da4adbf4573289e65109a5f789f2d29cf3.zip | |
Merge pull request #1267 from patricklodder/1.10-strict-auxpow
[auxpow] Check for auxpow fork strictly
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 5fffaa381..070b27832 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -2768,6 +2768,13 @@ bool ContextualCheckBlockHeader(const CBlockHeader& block, CValidationState& sta __func__, pindexPrev->nHeight + 1, consensusParams.nHeightEffective), REJECT_INVALID, "late-legacy-block"); + // Disallow AuxPow blocks before it is activated. + if (!consensusParams.fAllowAuxPow + && block.nVersion.IsAuxpow()) + return state.DoS(100, error("%s : auxpow blocks are not allowed at height %d, parameters effective from %d", + __func__, pindexPrev->nHeight + 1, consensusParams.nHeightEffective), + REJECT_INVALID, "early-auxpow-block"); + // Check proof of work if (block.nBits != GetNextWorkRequired(pindexPrev, &block, consensusParams)) return state.DoS(100, error("%s: incorrect proof of work at height %d", __func__, nHeight), |