|
|
|
@ -1619,13 +1619,11 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
@@ -1619,13 +1619,11 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
|
|
|
|
|
// 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 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->phashBlock) || // Enforce on CreateNewBlock invocations which don't have a hash.
|
|
|
|
|
!((pindex->nHeight==91842 && pindex->GetBlockHash() == uint256("0x00000000000a4d0a398161ffc163c503763b1f4360639393e0e4c8e300e0caec")) || |
|
|
|
|
(pindex->nHeight==91880 && pindex->GetBlockHash() == uint256("0x00000000000743f190a18c5577a3c2d2a1f610ae9601ac046a38084ccb7cd721"))); |
|
|
|
|
// This rule was originally applied all blocks whose timestamp was after October 1, 2012, 0:00 UTC.
|
|
|
|
|
// Now that the whole chain is irreversibly beyond that time it is applied to all blocks,
|
|
|
|
|
// this prevents exploiting the issue against nodes in their initial block download.
|
|
|
|
|
bool fEnforceBIP30 = true; |
|
|
|
|
|
|
|
|
|
if (fEnforceBIP30) { |
|
|
|
|
for (unsigned int i=0; i<vtx.size(); i++) { |
|
|
|
|
uint256 hash = GetTxHash(i); |
|
|
|
@ -1634,8 +1632,8 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
@@ -1634,8 +1632,8 @@ bool CBlock::ConnectBlock(CValidationState &state, CBlockIndex* pindex, CCoinsVi
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// BIP16 didn't become active until Apr 1 2012
|
|
|
|
|
int64 nBIP16SwitchTime = 1333238400; |
|
|
|
|
// BIP16 didn't become active until Oct 1 2012
|
|
|
|
|
int64 nBIP16SwitchTime = 1349049600; |
|
|
|
|
bool fStrictPayToScriptHash = (pindex->nTime >= nBIP16SwitchTime); |
|
|
|
|
|
|
|
|
|
unsigned int flags = SCRIPT_VERIFY_NOCACHE | |
|
|
|
|