Files
bitcoin/src/deploymentinfo.h
Sjors Provoost 5e87c3ec09 scripted-diff: rename gbt_force and gbt_force_name
The term "force" is ambiguous and not used in BIP9 where the ! rule
prefix is introduced.

Additionally, #29039 renamed gbt_vb_name to gbt_force_name which
might increase the confusion.

-BEGIN VERIFY SCRIPT-
sed -i s/gbt_force_name/gbt_rule_value/g ./src/rpc/mining.cpp
sed -i s/gbt_force/gbt_optional_rule/g $(git grep -l gbt_force)
-END VERIFY SCRIPT-
2025-04-30 14:51:21 +02:00

34 lines
1009 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 <array>
#include <optional>
#include <string>
struct VBDeploymentInfo {
/** Deployment name */
const char *name;
/** Whether GBT clients can safely ignore this rule in simplified usage */
bool gbt_optional_rule;
};
extern const std::array<VBDeploymentInfo,Consensus::MAX_VERSION_BITS_DEPLOYMENTS> VersionBitsDeploymentInfo;
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