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/node/blockstorage.cpp | |
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/node/blockstorage.cpp')
-rw-r--r-- | src/node/blockstorage.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index cadafcaa8d..103f4f0d7f 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -823,7 +823,7 @@ struct CImportingNow { } }; -void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImportFiles, const ArgsManager& args) +void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImportFiles, const ArgsManager& args, const fs::path& mempool_path) { SetSyscallSandboxPolicy(SyscallSandboxPolicy::INITIALIZATION_LOAD_BLOCKS); ScheduleBatchPriority(); @@ -893,6 +893,6 @@ void ThreadImport(ChainstateManager& chainman, std::vector<fs::path> vImportFile return; } } // End scope of CImportingNow - chainman.ActiveChainstate().LoadMempool(args); + chainman.ActiveChainstate().LoadMempool(mempool_path); } } // namespace node |