Skip to content

Commit b463bc9

Browse files
committed
scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/
-BEGIN VERIFY SCRIPT- sed -i 's/BIP9DeploymentInfo/VBDeploymentInfo/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ; -END VERIFY SCRIPT-
1 parent 29c0719 commit b463bc9

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/rpc/mining.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ static UniValue BIP22ValidationResult(const CValidationState& state)
303303
}
304304

305305
std::string gbt_vb_name(const Consensus::DeploymentPos pos) {
306-
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
306+
const struct VBDeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
307307
std::string s = vbinfo.name;
308308
if (!vbinfo.gbt_force) {
309309
s.insert(s.begin(), '!');
@@ -515,7 +515,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
515515
// TODO: Maybe recheck connections/IBD and (if something wrong) send an expires-immediately template to stop miners?
516516
}
517517

518-
const struct BIP9DeploymentInfo& segwit_info = VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_SEGWIT];
518+
const struct VBDeploymentInfo& segwit_info = VersionBitsDeploymentInfo[Consensus::DEPLOYMENT_SEGWIT];
519519
// If the caller is indicating segwit support, then allow CreateNewBlock()
520520
// to select witness transactions, after segwit activates (otherwise
521521
// don't).
@@ -629,7 +629,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
629629
// FALL THROUGH to get vbavailable set...
630630
case THRESHOLD_STARTED:
631631
{
632-
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
632+
const struct VBDeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
633633
vbavailable.push_back(Pair(gbt_vb_name(pos), consensusParams.vDeployments[pos].bit));
634634
if (setClientRules.find(vbinfo.name) == setClientRules.end()) {
635635
if (!vbinfo.gbt_force) {
@@ -642,7 +642,7 @@ UniValue getblocktemplate(const JSONRPCRequest& request)
642642
case THRESHOLD_ACTIVE:
643643
{
644644
// Add to rules only
645-
const struct BIP9DeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
645+
const struct VBDeploymentInfo& vbinfo = VersionBitsDeploymentInfo[pos];
646646
aRules.push_back(gbt_vb_name(pos));
647647
if (setClientRules.find(vbinfo.name) == setClientRules.end()) {
648648
// Not supported by the client; make sure it's safe to proceed

src/versionbits.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include "versionbits.h"
66
#include "consensus/params.h"
77

8-
const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = {
8+
const struct VBDeploymentInfo VersionBitsDeploymentInfo[Consensus::MAX_VERSION_BITS_DEPLOYMENTS] = {
99
{
1010
/*.name =*/ "testdummy",
1111
/*.gbt_force =*/ true,

src/versionbits.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ enum ThresholdState {
3030
// will either be NULL or a block with (height + 1) % Period() == 0.
3131
typedef std::map<const CBlockIndex*, ThresholdState> ThresholdConditionCache;
3232

33-
struct BIP9DeploymentInfo {
33+
struct VBDeploymentInfo {
3434
/** Deployment name */
3535
const char *name;
3636
/** Whether GBT clients can safely ignore this rule in simplified usage */
@@ -45,7 +45,7 @@ struct BIP9Stats {
4545
bool possible;
4646
};
4747

48-
extern const struct BIP9DeploymentInfo VersionBitsDeploymentInfo[];
48+
extern const struct VBDeploymentInfo VersionBitsDeploymentInfo[];
4949

5050
/**
5151
* Abstract class that implements BIP9-style threshold logic, and caches results.

0 commit comments

Comments
 (0)