aboutsummaryrefslogtreecommitdiff
path: root/src/validation.cpp
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-09-16 17:48:55 -0400
committerCarl Dong <contact@carldong.me>2021-02-18 14:49:10 -0500
commit714201881251a787423fbca34f70fed505e9dc28 (patch)
treee4dc2e14008727f3755ec41a1afe4bef762af618 /src/validation.cpp
parent71734c65dc491a4bb654ccbb7a1dd0e12131cee4 (diff)
downloadbitcoin-714201881251a787423fbca34f70fed505e9dc28.tar.xz
validation: Pass in chainstate to CTxMemPool::removeForReorg
Several other parameters are now redundant since they can be safely obtained from the chainstate given that ::cs_main is locked. These are now removed.
Diffstat (limited to 'src/validation.cpp')
-rw-r--r--src/validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/validation.cpp b/src/validation.cpp
index 870f41a16f..36b24b371a 100644
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -406,7 +406,7 @@ static void UpdateMempoolForReorg(CTxMemPool& mempool, DisconnectedBlockTransact
mempool.UpdateTransactionsFromBlock(vHashUpdate);
// We also need to remove any now-immature transactions
- mempool.removeForReorg(&::ChainstateActive().CoinsTip(), ::ChainActive().Tip()->nHeight + 1, STANDARD_LOCKTIME_VERIFY_FLAGS);
+ mempool.removeForReorg(::ChainstateActive(), STANDARD_LOCKTIME_VERIFY_FLAGS);
// Re-limit mempool size, in case we added any transactions
LimitMempoolSize(mempool, ::ChainstateActive().CoinsTip(), gArgs.GetArg("-maxmempool", DEFAULT_MAX_MEMPOOL_SIZE) * 1000000, std::chrono::hours{gArgs.GetArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY)});
}