diff options
author | Gavin Andresen <gavinandresen@gmail.com> | 2012-09-12 10:20:46 -0400 |
---|---|---|
committer | Gavin Andresen <gavinandresen@gmail.com> | 2012-09-12 10:20:46 -0400 |
commit | d078739965e09a74b50b52a66079fee804800341 (patch) | |
tree | e91652077614bb6bb5434cbf87fd3ee14093ef83 | |
parent | 8b1eb5687df3f01edeaa2724783faa6a3c08aa03 (diff) | |
parent | ab91bf39b7c11e9c86bb2043c24f0f377f1cf514 (diff) |
Merge branch 'bip30_harder' of git://github.com/gmaxwell/bitcoin
-rw-r--r-- | src/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index 302292ee29..9b43825433 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1360,9 +1360,12 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) // See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information. // This logic is not necessary for memory pool transactions, as AcceptToMemoryPool // already refuses previously-known transaction ids entirely. - // This rule applies to all blocks whose timestamp is after March 15, 2012, 0:00 UTC. - int64 nBIP30SwitchTime = 1331769600; - bool fEnforceBIP30 = (pindex->nTime > nBIP30SwitchTime); + // This rule was originally applied all blocks whose timestamp was after March 15, 2012, 0:00 UTC. + // Now that the whole chain is irreversibly beyond that time it is applied to all blocks except the + // two in the chain that violate it. This prevents exploiting the issue against nodes in their + // initial block download. + bool fEnforceBIP30 = !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) || + (pindex->nHeight==91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721"))); // BIP16 didn't become active until Apr 1 2012 int64 nBIP16SwitchTime = 1333238400; |