diff options
author | Carl Dong <contact@carldong.me> | 2022-07-12 21:42:00 -0400 |
---|---|---|
committer | Carl Dong <contact@carldong.me> | 2022-07-15 12:26:20 -0400 |
commit | 06b88ffb8ae7f2b2a93a32908cd80e77fafd270c (patch) | |
tree | 3900f5448c90bf9a3f9f9de58aa9cac203e68589 /src/validation.h | |
parent | b857ac60d9a0433036519c26675378bbf56a1de1 (diff) | |
download | bitcoin-06b88ffb8ae7f2b2a93a32908cd80e77fafd270c.tar.xz |
LoadMempool: Pass in load_path, stop using gArgs
Also:
1. Have CChainState::LoadMempool and ::ThreadImport take in paths and
pass it through untouched to LoadMempool.
2. Make LoadMempool exit early if the load_path is empty.
3. Adjust the call to ::ThreadImport in ::AppInitMain to correctly pass
in an empty path if mempool persistence is disabled.
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h index 85b7a59b5d..fad94af8e2 100644 --- a/src/validation.h +++ b/src/validation.h @@ -679,7 +679,7 @@ public: void CheckBlockIndex(); /** Load the persisted mempool from disk */ - void LoadMempool(const ArgsManager& args, fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen); + void LoadMempool(const fs::path& load_path, fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen); /** Update the chain tip based on database information, i.e. CoinsTip()'s best block. */ bool LoadChainTip() EXCLUSIVE_LOCKS_REQUIRED(cs_main); @@ -1018,7 +1018,7 @@ bool DeploymentEnabled(const ChainstateManager& chainman, DEP dep) bool DumpMempool(const CTxMemPool& pool, const fs::path& dump_path, fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen, bool skip_file_commit = false); /** Load the mempool from disk. */ -bool LoadMempool(CTxMemPool& pool, CChainState& active_chainstate, fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen); +bool LoadMempool(CTxMemPool& pool, const fs::path& load_path, CChainState& active_chainstate, fsbridge::FopenFn mockable_fopen_function = fsbridge::fopen); /** * Return the expected assumeutxo value for a given height, if one exists. |