aboutsummaryrefslogtreecommitdiff
path: root/src/kernel
diff options
context:
space:
mode:
authorTheCharlatan <seb.kung@gmail.com>2023-05-04 23:04:35 +0200
committerTheCharlatan <seb.kung@gmail.com>2023-05-30 16:52:47 +0200
commitef95be334f3aec671346372b64606e0fd390979a (patch)
tree03df44601f4b14cd148a9940808215892c4926fd /src/kernel
parent214f8f18b310e3af88eba6a005439ae423ccd76a (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/kernel')
-rw-r--r--src/kernel/chainstatemanager_opts.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/kernel/chainstatemanager_opts.h b/src/kernel/chainstatemanager_opts.h
index 917f7d226c..035a913d10 100644
--- a/src/kernel/chainstatemanager_opts.h
+++ b/src/kernel/chainstatemanager_opts.h
@@ -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