@@ -2515,7 +2515,6 @@ void static UpdateTip(CBlockIndex *pindexNew) {
2515
2515
bool static DisconnectTip (CValidationState &state, bool fBare = false ) {
2516
2516
CBlockIndex *pindexDelete = chainActive.Tip ();
2517
2517
assert (pindexDelete);
2518
- mempool.check (pcoinsTip);
2519
2518
// Read block from disk.
2520
2519
CBlock block;
2521
2520
if (!ReadBlockFromDisk (block, pindexDelete))
@@ -2550,7 +2549,6 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) {
2550
2549
mempool.removeWithAnchor (anchorBeforeDisconnect);
2551
2550
}
2552
2551
mempool.removeCoinbaseSpends (pcoinsTip, pindexDelete->nHeight );
2553
- mempool.check (pcoinsTip);
2554
2552
}
2555
2553
2556
2554
// Update chainActive and related variables.
@@ -2580,7 +2578,6 @@ static int64_t nTimePostConnect = 0;
2580
2578
*/
2581
2579
bool static ConnectTip (CValidationState &state, CBlockIndex *pindexNew, CBlock *pblock) {
2582
2580
assert (pindexNew->pprev == chainActive.Tip ());
2583
- mempool.check (pcoinsTip);
2584
2581
// Read block from disk.
2585
2582
int64_t nTime1 = GetTimeMicros ();
2586
2583
CBlock block;
@@ -2620,7 +2617,6 @@ bool static ConnectTip(CValidationState &state, CBlockIndex *pindexNew, CBlock *
2620
2617
// Remove conflicting transactions from the mempool.
2621
2618
list<CTransaction> txConflicted;
2622
2619
mempool.removeForBlock (pblock->vtx , pindexNew->nHeight , txConflicted, !IsInitialBlockDownload ());
2623
- mempool.check (pcoinsTip);
2624
2620
// Update chainActive & related variables.
2625
2621
UpdateTip (pindexNew);
2626
2622
// Tell wallet about transactions that went from mempool
@@ -2771,6 +2767,7 @@ static bool ActivateBestChainStep(CValidationState &state, CBlockIndex *pindexMo
2771
2767
}
2772
2768
}
2773
2769
}
2770
+ mempool.check (pcoinsTip);
2774
2771
2775
2772
// Callbacks/notifications for a new best chain.
2776
2773
if (fInvalidFound )
0 commit comments