Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115348
D12203.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Subscribers
None
D12203.diff
View Options
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
Details
Attached
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)
Attached To
D12203: refactor: replace config with chain params in LoadMempool arguments
Event Timeline
Log In to Comment