2013-05-07 15:16:25 +02:00
|
|
|
// Copyright (c) 2009-2010 Satoshi Nakamoto
|
2021-12-30 19:36:57 +02:00
|
|
|
// Copyright (c) 2009-2021 The Bitcoin Core developers
|
2014-10-25 17:24:16 +08:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-05-07 15:16:25 +02:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#ifndef BITCOIN_CHAINPARAMS_H
|
|
|
|
#define BITCOIN_CHAINPARAMS_H
|
2013-05-07 15:16:25 +02:00
|
|
|
|
2023-05-25 19:24:08 +02:00
|
|
|
#include <kernel/chainparams.h> // IWYU pragma: export
|
2022-03-10 22:13:58 -05:00
|
|
|
|
2015-05-22 03:50:01 +02:00
|
|
|
#include <memory>
|
2013-05-07 15:16:25 +02:00
|
|
|
|
2023-04-18 13:40:47 +02:00
|
|
|
class ArgsManager;
|
|
|
|
|
2015-05-22 03:50:01 +02:00
|
|
|
/**
|
|
|
|
* Creates and returns a std::unique_ptr<CChainParams> of the chosen chain.
|
|
|
|
*/
|
2023-04-17 22:20:59 +02:00
|
|
|
std::unique_ptr<const CChainParams> CreateChainParams(const ArgsManager& args, const ChainType chain);
|
2015-05-22 03:50:01 +02:00
|
|
|
|
2013-05-07 15:16:25 +02:00
|
|
|
/**
|
2015-04-28 14:48:28 +00:00
|
|
|
* Return the currently selected parameters. This won't change after app
|
|
|
|
* startup, except for unit tests.
|
2013-05-07 15:16:25 +02:00
|
|
|
*/
|
|
|
|
const CChainParams &Params();
|
|
|
|
|
|
|
|
/**
|
2023-05-09 22:03:50 +02:00
|
|
|
* Sets the params returned by Params() to those for the given chain type.
|
2013-05-07 15:16:25 +02:00
|
|
|
*/
|
2023-04-17 22:20:59 +02:00
|
|
|
void SelectParams(const ChainType chain);
|
2013-05-07 15:16:25 +02:00
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#endif // BITCOIN_CHAINPARAMS_H
|