mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-26 03:03:22 -03:00
84b85786f0
RegTest chain params can now be initialized by configuring a RegTestOptions struct, or with ArgsManager. This offers an interface for creating RegTestChainParams without a gArgs object.
32 lines
973 B
C++
32 lines
973 B
C++
// Copyright (c) 2016-2021 The Bitcoin Core developers
|
|
// Distributed under the MIT software license, see the accompanying
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
#ifndef BITCOIN_DEPLOYMENTINFO_H
|
|
#define BITCOIN_DEPLOYMENTINFO_H
|
|
|
|
#include <consensus/params.h>
|
|
|
|
#include <optional>
|
|
#include <string>
|
|
|
|
struct VBDeploymentInfo {
|
|
/** Deployment name */
|
|
const char *name;
|
|
/** Whether GBT clients can safely ignore this rule in simplified usage */
|
|
bool gbt_force;
|
|
};
|
|
|
|
extern const VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS];
|
|
|
|
std::string DeploymentName(Consensus::BuriedDeployment dep);
|
|
|
|
inline std::string DeploymentName(Consensus::DeploymentPos pos)
|
|
{
|
|
assert(Consensus::ValidDeployment(pos));
|
|
return VersionBitsDeploymentInfo[pos].name;
|
|
}
|
|
|
|
std::optional<Consensus::BuriedDeployment> GetBuriedDeployment(const std::string_view deployment_name);
|
|
|
|
#endif // BITCOIN_DEPLOYMENTINFO_H
|