diff options
author | TheCharlatan <seb.kung@gmail.com> | 2023-05-04 23:04:35 +0200 |
---|---|---|
committer | TheCharlatan <seb.kung@gmail.com> | 2023-05-30 16:52:47 +0200 |
commit | ef95be334f3aec671346372b64606e0fd390979a (patch) | |
tree | 03df44601f4b14cd148a9940808215892c4926fd /src/validation.h | |
parent | 214f8f18b310e3af88eba6a005439ae423ccd76a (diff) |
refactor: Add stop_at_height option in ChainstateManager
Remove access to the global gArgs for the stopatheight argument and
replace it by adding a field to the existing ChainstateManager Options
struct.
This should eventually allow users of the ChainstateManager to not rely
on the global gArgs and instead pass in their own options.
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h index 444fe72db4..48a1b075b8 100644 --- a/src/validation.h +++ b/src/validation.h @@ -65,8 +65,6 @@ struct Params; static const int MAX_SCRIPTCHECK_THREADS = 15; /** -par default (number of script-checking threads, 0 = auto) */ static const int DEFAULT_SCRIPTCHECK_THREADS = 0; -/** Default for -stopatheight */ -static const int DEFAULT_STOPATHEIGHT = 0; /** Block files containing a block-height within MIN_BLOCKS_TO_KEEP of ActiveChain().Tip() will not be pruned. */ static const unsigned int MIN_BLOCKS_TO_KEEP = 288; static const signed int DEFAULT_CHECKBLOCKS = 6; @@ -960,6 +958,7 @@ public: const arith_uint256& MinimumChainWork() const { return *Assert(m_options.minimum_chain_work); } const uint256& AssumedValidBlock() const { return *Assert(m_options.assumed_valid_block); } kernel::Notifications& GetNotifications() const { return m_options.notifications; }; + int StopAtHeight() const { return m_options.stop_at_height; }; /** * Alias for ::cs_main. |