aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorLuke Dashjr <luke-jr+git@utopios.org>2012-09-17 02:07:03 +0000
committerLuke Dashjr <luke-jr+git@utopios.org>2012-09-17 02:07:03 +0000
commite7770992ab92c1e667827abdbef52a8110f4a985 (patch)
tree77570b6d8623ebea6fea7c84fa34ad5c7aa48779 /src/main.cpp
parentbe2e2845ec0844d42008287842bb053aabe58b0b (diff)
parent3a9899f6a88b00160a82b12d451750e6ae4245cc (diff)
downloadbitcoin-e7770992ab92c1e667827abdbef52a8110f4a985.tar.xz
Merge branch '0.5.x' into 0.6.0.x
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 129e09929a..4d95c49692 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1300,9 +1300,18 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex)
// 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.
+ // 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.
// On testnet it is enabled as of februari 20, 2012, 0:00 UTC.
- if (pindex->nTime > 1331769600 || (fTestNet && pindex->nTime > 1329696000))
+ bool fEnforceBIP30;
+ if (fTestNet)
+ fEnforceBIP30 = pindex->nTime > 1329696000;
+ else
+ fEnforceBIP30 = !((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) ||
+ (pindex->nHeight==91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721")));
+ if (fEnforceBIP30)
{
BOOST_FOREACH(CTransaction& tx, vtx)
{