mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
refactor, blockstorage: Replace stopafterblockimport arg
Add a stop_after_block_import field to the BlockManager options. Use this field instead of the global gArgs. This should allow users of the BlockManager to not rely on the global Args.
This commit is contained in:
@@ -112,6 +112,7 @@
|
||||
#include <zmq/zmqrpc.h>
|
||||
#endif
|
||||
|
||||
using kernel::DEFAULT_STOPAFTERBLOCKIMPORT;
|
||||
using kernel::DumpMempool;
|
||||
using kernel::ValidationCacheSizes;
|
||||
|
||||
@@ -121,7 +122,6 @@ using node::CacheSizes;
|
||||
using node::CalculateCacheSizes;
|
||||
using node::DEFAULT_PERSIST_MEMPOOL;
|
||||
using node::DEFAULT_PRINTPRIORITY;
|
||||
using node::DEFAULT_STOPAFTERBLOCKIMPORT;
|
||||
using node::fReindex;
|
||||
using node::LoadChainstate;
|
||||
using node::MempoolPath;
|
||||
@@ -1680,7 +1680,7 @@ bool AppInitMain(NodeContext& node, interfaces::BlockAndHeaderTipInfo* tip_info)
|
||||
}
|
||||
|
||||
chainman.m_load_block = std::thread(&util::TraceThread, "loadblk", [=, &chainman, &args] {
|
||||
ThreadImport(chainman, vImportFiles, args, ShouldPersistMempool(args) ? MempoolPath(args) : fs::path{});
|
||||
ThreadImport(chainman, vImportFiles, ShouldPersistMempool(args) ? MempoolPath(args) : fs::path{});
|
||||
});
|
||||
|
||||
// Wait for genesis block to be processed
|
||||
|
||||
Reference in New Issue
Block a user