mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
This changes the assumed valid block for the bitcoin-chainstate
executable. Previously it was uint256{}, now it is defaultAssumeValid.
19 lines
616 B
C++
19 lines
616 B
C++
// 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.GetArg("-assumevalid")}) opts.assumed_valid_block = uint256S(*value);
|
|
|
|
if (auto value{args.GetIntArg("-maxtipage")}) opts.max_tip_age = std::chrono::seconds{*value};
|
|
}
|
|
} // namespace node
|