mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Move ::nMaxTipAge into ChainstateManager
This commit is contained in:
parent
ba441d493c
commit
faf44876db
8 changed files with 53 additions and 14 deletions
17
src/node/chainstatemanager_args.cpp
Normal file
17
src/node/chainstatemanager_args.cpp
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue