|
|
@ -1429,7 +1429,7 @@ bool CheckInputs(const CTransaction& tx, CValidationState &state, const CCoinsVi |
|
|
|
// Helps prevent CPU exhaustion attacks.
|
|
|
|
// Helps prevent CPU exhaustion attacks.
|
|
|
|
|
|
|
|
|
|
|
|
// Skip script verification when connecting blocks under the
|
|
|
|
// Skip script verification when connecting blocks under the
|
|
|
|
// assumedvalid block. Assuming the assumedvalid block is valid this
|
|
|
|
// assumevalid block. Assuming the assumevalid block is valid this
|
|
|
|
// is safe because block merkle hashes are still computed and checked,
|
|
|
|
// is safe because block merkle hashes are still computed and checked,
|
|
|
|
// Of course, if an assumed valid block is invalid due to false scriptSigs
|
|
|
|
// Of course, if an assumed valid block is invalid due to false scriptSigs
|
|
|
|
// this optimization would allow an invalid chain to be accepted.
|
|
|
|
// this optimization would allow an invalid chain to be accepted.
|
|
|
@ -2486,12 +2486,12 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, |
|
|
|
bool fInitialDownload; |
|
|
|
bool fInitialDownload; |
|
|
|
{ |
|
|
|
{ |
|
|
|
LOCK(cs_main); |
|
|
|
LOCK(cs_main); |
|
|
|
{ // TODO: Tempoarily ensure that mempool removals are notified before
|
|
|
|
{ // TODO: Temporarily ensure that mempool removals are notified before
|
|
|
|
// connected transactions. This shouldn't matter, but the abandoned
|
|
|
|
// connected transactions. This shouldn't matter, but the abandoned
|
|
|
|
// state of transactions in our wallet is currently cleared when we
|
|
|
|
// state of transactions in our wallet is currently cleared when we
|
|
|
|
// receive another notification and there is a race condition where
|
|
|
|
// receive another notification and there is a race condition where
|
|
|
|
// notification of a connected conflict might cause an outside process
|
|
|
|
// notification of a connected conflict might cause an outside process
|
|
|
|
// to abandon a transaction and then have it inadvertantly cleared by
|
|
|
|
// to abandon a transaction and then have it inadvertently cleared by
|
|
|
|
// the notification that the conflicted transaction was evicted.
|
|
|
|
// the notification that the conflicted transaction was evicted.
|
|
|
|
MemPoolConflictRemovalTracker mrt(mempool); |
|
|
|
MemPoolConflictRemovalTracker mrt(mempool); |
|
|
|
CBlockIndex *pindexOldTip = chainActive.Tip(); |
|
|
|
CBlockIndex *pindexOldTip = chainActive.Tip(); |
|
|
@ -2520,7 +2520,7 @@ bool ActivateBestChain(CValidationState &state, const CChainParams& chainparams, |
|
|
|
|
|
|
|
|
|
|
|
} // MemPoolConflictRemovalTracker destroyed and conflict evictions are notified
|
|
|
|
} // MemPoolConflictRemovalTracker destroyed and conflict evictions are notified
|
|
|
|
|
|
|
|
|
|
|
|
// Transactions in the connnected block are notified
|
|
|
|
// Transactions in the connected block are notified
|
|
|
|
for (const auto& pair : connectTrace.blocksConnected) { |
|
|
|
for (const auto& pair : connectTrace.blocksConnected) { |
|
|
|
assert(pair.second); |
|
|
|
assert(pair.second); |
|
|
|
const CBlock& block = *(pair.second); |
|
|
|
const CBlock& block = *(pair.second); |
|
|
|