Page MenuHomePhabricator

D12203.diff
No OneTemporary

D12203.diff

diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp
--- a/src/node/blockstorage.cpp
+++ b/src/node/blockstorage.cpp
@@ -574,5 +574,5 @@
return;
}
} // End scope of CImportingNow
- chainman.ActiveChainstate().LoadMempool(config, args);
+ chainman.ActiveChainstate().LoadMempool(args);
}
diff --git a/src/validation.h b/src/validation.h
--- a/src/validation.h
+++ b/src/validation.h
@@ -1088,7 +1088,7 @@
void CheckBlockIndex();
/** Load the persisted mempool from disk */
- void LoadMempool(const Config &config, const ArgsManager &args);
+ void LoadMempool(const ArgsManager &args);
/** Update the chain tip based on database information, i.e. CoinsTip()'s
* best block. */
@@ -1402,7 +1402,7 @@
bool DumpMempool(const CTxMemPool &pool);
/** Load the mempool from disk. */
-bool LoadMempool(const Config &config, CTxMemPool &pool,
+bool LoadMempool(const CChainParams &chain_params, CTxMemPool &pool,
CChainState &active_chainstate);
/**
diff --git a/src/validation.cpp b/src/validation.cpp
--- a/src/validation.cpp
+++ b/src/validation.cpp
@@ -4621,9 +4621,9 @@
return true;
}
-void CChainState::LoadMempool(const Config &config, const ArgsManager &args) {
+void CChainState::LoadMempool(const ArgsManager &args) {
if (args.GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)) {
- ::LoadMempool(config, m_mempool, *this);
+ ::LoadMempool(m_params, m_mempool, *this);
}
m_mempool.SetIsLoaded(!ShutdownRequested());
}
@@ -5566,7 +5566,7 @@
static const uint64_t MEMPOOL_DUMP_VERSION = 1;
-bool LoadMempool(const Config &config, CTxMemPool &pool,
+bool LoadMempool(const CChainParams &chain_params, CTxMemPool &pool,
CChainState &active_chainstate) {
int64_t nExpiryTimeout =
gArgs.GetIntArg("-mempoolexpiry", DEFAULT_MEMPOOL_EXPIRY) * 60 * 60;
@@ -5609,10 +5609,9 @@
}
if (nTime > nNow - nExpiryTimeout) {
LOCK(cs_main);
- if (AcceptToMemoryPoolWithTime(config.GetChainParams(), pool,
- active_chainstate, tx, nTime,
- false /* bypass_limits */,
- false /* test_accept */)
+ if (AcceptToMemoryPoolWithTime(
+ chain_params, pool, active_chainstate, tx, nTime,
+ false /* bypass_limits */, false /* test_accept */)
.m_result_type ==
MempoolAcceptResult::ResultType::VALID) {
++count;

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 10:55 (11 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5187419
Default Alt Text
D12203.diff (2 KB)

Event Timeline