Skip to content

Commit aa1cc47

Browse files
committed
Move mempool nullptr Assert out of LoadChainstate
Summary: Partial backport of [[bitcoin/bitcoin#23280 | core#23280]]: bitcoin/bitcoin@8715658 Depends on D12566. Test Plan: ninja all check-all Reviewers: #bitcoin_abc, PiRK Reviewed By: #bitcoin_abc, PiRK Differential Revision: https://reviews.bitcoinabc.org/D12567
1 parent f57aef1 commit aa1cc47

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/init.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -2466,9 +2466,9 @@ bool AppInitMain(Config &config, RPCServer &rpcServer,
24662466
const int64_t load_block_index_start_time = GetTimeMillis();
24672467

24682468
auto rv =
2469-
LoadChainstate(fReset, chainman, node.mempool.get(), fPruneMode,
2470-
config, fReindexChainState, nBlockTreeDBCache,
2471-
nCoinDBCache, nCoinCacheUsage,
2469+
LoadChainstate(fReset, chainman, Assert(node.mempool.get()),
2470+
fPruneMode, config, fReindexChainState,
2471+
nBlockTreeDBCache, nCoinDBCache, nCoinCacheUsage,
24722472
args.GetIntArg("-checkblocks", DEFAULT_CHECKBLOCKS),
24732473
args.GetIntArg("-checklevel", DEFAULT_CHECKLEVEL));
24742474

src/node/chainstate.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ LoadChainstate(bool fReset, ChainstateManager &chainman, CTxMemPool *mempool,
3030
do {
3131
try {
3232
LOCK(cs_main);
33-
chainman.InitializeChainstate(Assert(mempool));
33+
chainman.InitializeChainstate(mempool);
3434
chainman.m_total_coinstip_cache = nCoinCacheUsage;
3535
chainman.m_total_coinsdb_cache = nCoinDBCache;
3636

0 commit comments

Comments
 (0)