|
|
@ -564,7 +564,7 @@ bool CTxMemPool::accept(CTxDB& txdb, CTransaction &tx, bool fCheckInputs, |
|
|
|
|
|
|
|
|
|
|
|
// Continuously rate-limit free transactions
|
|
|
|
// Continuously rate-limit free transactions
|
|
|
|
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
|
|
|
// This mitigates 'penny-flooding' -- sending thousands of free transactions just to
|
|
|
|
// be annoying or make other's transactions take longer to confirm.
|
|
|
|
// be annoying or make others' transactions take longer to confirm.
|
|
|
|
if (nFees < MIN_RELAY_TX_FEE) |
|
|
|
if (nFees < MIN_RELAY_TX_FEE) |
|
|
|
{ |
|
|
|
{ |
|
|
|
static CCriticalSection cs; |
|
|
|
static CCriticalSection cs; |
|
|
@ -1102,7 +1102,7 @@ bool CTransaction::FetchInputs(CTxDB& txdb, const map<uint256, CTxIndex>& mapTes |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Make sure all prevout.n's are valid:
|
|
|
|
// Make sure all prevout.n indexes are valid:
|
|
|
|
for (unsigned int i = 0; i < vin.size(); i++) |
|
|
|
for (unsigned int i = 0; i < vin.size(); i++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const COutPoint prevout = vin[i].prevout; |
|
|
|
const COutPoint prevout = vin[i].prevout; |
|
|
@ -1338,7 +1338,7 @@ bool CBlock::ConnectBlock(CTxDB& txdb, CBlockIndex* pindex, bool fJustCheck) |
|
|
|
// being sent to another address.
|
|
|
|
// being sent to another address.
|
|
|
|
// See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information.
|
|
|
|
// See BIP30 and http://r6.ca/blog/20120206T005236Z.html for more information.
|
|
|
|
// This logic is not necessary for memory pool transactions, as AcceptToMemoryPool
|
|
|
|
// This logic is not necessary for memory pool transactions, as AcceptToMemoryPool
|
|
|
|
// already refuses previously-known transaction id's entirely.
|
|
|
|
// 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 applies to all blocks whose timestamp is after March 15, 2012, 0:00 UTC.
|
|
|
|
int64 nBIP30SwitchTime = 1331769600; |
|
|
|
int64 nBIP30SwitchTime = 1331769600; |
|
|
|
bool fEnforceBIP30 = (pindex->nTime > nBIP30SwitchTime); |
|
|
|
bool fEnforceBIP30 = (pindex->nTime > nBIP30SwitchTime); |
|
|
|