aboutsummaryrefslogtreecommitdiff
path: root/src/node/chainstatemanager_args.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/node/chainstatemanager_args.cpp')
-rw-r--r--src/node/chainstatemanager_args.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/node/chainstatemanager_args.cpp b/src/node/chainstatemanager_args.cpp
new file mode 100644
index 0000000000..05aba3d23e
--- /dev/null
+++ b/src/node/chainstatemanager_args.cpp
@@ -0,0 +1,17 @@
+// Copyright (c) 2022 The Bitcoin Core developers
+// Distributed under the MIT software license, see the accompanying
+// file COPYING or http://www.opensource.org/licenses/mit-license.php.
+
+#include <node/chainstatemanager_args.h>
+
+#include <util/system.h>
+
+#include <chrono>
+#include <optional>
+
+namespace node {
+void ApplyArgsManOptions(const ArgsManager& args, ChainstateManager::Options& opts)
+{
+ if (auto value{args.GetIntArg("-maxtipage")}) opts.max_tip_age = std::chrono::seconds{*value};
+}
+} // namespace node