mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-19 06:43:45 +01:00
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.
This commit is contained in:
@@ -21,6 +21,7 @@ class CChainParams;
|
||||
|
||||
static constexpr bool DEFAULT_CHECKPOINTS_ENABLED{true};
|
||||
static constexpr auto DEFAULT_MAX_TIP_AGE{24h};
|
||||
static constexpr int DEFAULT_STOPATHEIGHT{0};
|
||||
|
||||
namespace kernel {
|
||||
|
||||
@@ -45,6 +46,7 @@ struct ChainstateManagerOpts {
|
||||
DBOptions coins_db{};
|
||||
CoinsViewOptions coins_view{};
|
||||
Notifications& notifications;
|
||||
int stop_at_height{DEFAULT_STOPATHEIGHT};
|
||||
};
|
||||
|
||||
} // namespace kernel
|
||||
|
||||
Reference in New Issue
Block a user