diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-02-19 10:20:34 +0100 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-05-10 19:07:46 +0200 |
commit | 5ff63a09a9edd1204b2cc56cf6f48a44adab7bb3 (patch) | |
tree | 6b13bc7b2b3c10e6761b2bd6cc83a687fe020808 /src/kernel | |
parent | 18e5ba7c8002bcd473ee29ce4b5bfc56df6142a4 (diff) |
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.
Diffstat (limited to 'src/kernel')
-rw-r--r-- | src/kernel/blockmanager_opts.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/kernel/blockmanager_opts.h b/src/kernel/blockmanager_opts.h index 608a852836..8f26422f72 100644 --- a/src/kernel/blockmanager_opts.h +++ b/src/kernel/blockmanager_opts.h @@ -13,6 +13,8 @@ class CChainParams; namespace kernel { +static constexpr bool DEFAULT_STOPAFTERBLOCKIMPORT{false}; + /** * An options struct for `BlockManager`, more ergonomically referred to as * `BlockManager::Options` due to the using-declaration in `BlockManager`. @@ -21,6 +23,7 @@ struct BlockManagerOpts { const CChainParams& chainparams; uint64_t prune_target{0}; bool fast_prune{false}; + bool stop_after_block_import{DEFAULT_STOPAFTERBLOCKIMPORT}; const fs::path blocks_dir; }; |