Skip to content

Commit 29c0719

Browse files
shaolinfryjtimon
authored andcommitted
Rename -bip9params to -vbparams
1 parent 4314544 commit 29c0719

File tree

5 files changed

+16
-17
lines changed

5 files changed

+16
-17
lines changed

src/chainparams.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ static CBlock CreateGenesisBlock(uint32_t nTime, uint32_t nNonce, uint32_t nBits
5555
return CreateGenesisBlock(pszTimestamp, genesisOutputScript, nTime, nNonce, nBits, nVersion, genesisReward);
5656
}
5757

58-
void CChainParams::UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
58+
void CChainParams::UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
5959
{
6060
consensus.vDeployments[d].nStartTime = nStartTime;
6161
consensus.vDeployments[d].nTimeout = nTimeout;
@@ -356,8 +356,7 @@ void SelectParams(const std::string& network)
356356
globalChainParams = CreateChainParams(network);
357357
}
358358

359-
void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
359+
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout)
360360
{
361-
globalChainParams->UpdateBIP9Parameters(d, nStartTime, nTimeout);
361+
globalChainParams->UpdateVersionBitsParameters(d, nStartTime, nTimeout);
362362
}
363-

src/chainparams.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ class CChainParams
7676
const std::vector<SeedSpec6>& FixedSeeds() const { return vFixedSeeds; }
7777
const CCheckpointData& Checkpoints() const { return checkpointData; }
7878
const ChainTxData& TxData() const { return chainTxData; }
79-
void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
79+
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
8080
protected:
8181
CChainParams() {}
8282

@@ -116,8 +116,8 @@ const CChainParams &Params();
116116
void SelectParams(const std::string& chain);
117117

118118
/**
119-
* Allows modifying the BIP9 regtest parameters.
119+
* Allows modifying the Version Bits regtest parameters.
120120
*/
121-
void UpdateBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
121+
void UpdateVersionBitsParameters(Consensus::DeploymentPos d, int64_t nStartTime, int64_t nTimeout);
122122

123123
#endif // BITCOIN_CHAINPARAMS_H

src/init.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ std::string HelpMessage(HelpMessageMode mode)
449449
strUsage += HelpMessageOpt("-limitancestorsize=<n>", strprintf("Do not accept transactions whose size with all in-mempool ancestors exceeds <n> kilobytes (default: %u)", DEFAULT_ANCESTOR_SIZE_LIMIT));
450450
strUsage += HelpMessageOpt("-limitdescendantcount=<n>", strprintf("Do not accept transactions if any ancestor would have <n> or more in-mempool descendants (default: %u)", DEFAULT_DESCENDANT_LIMIT));
451451
strUsage += HelpMessageOpt("-limitdescendantsize=<n>", strprintf("Do not accept transactions if any ancestor would have more than <n> kilobytes of in-mempool descendants (default: %u).", DEFAULT_DESCENDANT_SIZE_LIMIT));
452-
strUsage += HelpMessageOpt("-bip9params=deployment:start:end", "Use given start/end times for specified BIP9 deployment (regtest-only)");
452+
strUsage += HelpMessageOpt("-vbparams=deployment:start:end", "Use given start/end times for specified version bits deployment (regtest-only)");
453453
}
454454
strUsage += HelpMessageOpt("-debug=<category>", strprintf(_("Output debugging information (default: %u, supplying <category> is optional)"), 0) + ". " +
455455
_("If <category> is not supplied or if <category> = 1, output all debugging information.") + " " + _("<category> can be:") + " " + ListLogCategories() + ".");
@@ -1104,16 +1104,16 @@ bool AppInitParameterInteraction()
11041104
fEnableReplacement = (std::find(vstrReplacementModes.begin(), vstrReplacementModes.end(), "fee") != vstrReplacementModes.end());
11051105
}
11061106

1107-
if (gArgs.IsArgSet("-bip9params")) {
1108-
// Allow overriding BIP9 parameters for testing
1107+
if (gArgs.IsArgSet("-vbparams")) {
1108+
// Allow overriding version bits parameters for testing
11091109
if (!chainparams.MineBlocksOnDemand()) {
1110-
return InitError("BIP9 parameters may only be overridden on regtest.");
1110+
return InitError("Version bits parameters may only be overridden on regtest.");
11111111
}
1112-
for (const std::string& strDeployment : gArgs.GetArgs("-bip9params")) {
1112+
for (const std::string& strDeployment : gArgs.GetArgs("-vbparams")) {
11131113
std::vector<std::string> vDeploymentParams;
11141114
boost::split(vDeploymentParams, strDeployment, boost::is_any_of(":"));
11151115
if (vDeploymentParams.size() != 3) {
1116-
return InitError("BIP9 parameters malformed, expecting deployment:start:end");
1116+
return InitError("Version bits parameters malformed, expecting deployment:start:end");
11171117
}
11181118
int64_t nStartTime, nTimeout;
11191119
if (!ParseInt64(vDeploymentParams[1], &nStartTime)) {
@@ -1126,9 +1126,9 @@ bool AppInitParameterInteraction()
11261126
for (int j=0; j<(int)Consensus::MAX_VERSION_BITS_DEPLOYMENTS; ++j)
11271127
{
11281128
if (vDeploymentParams[0].compare(VersionBitsDeploymentInfo[j].name) == 0) {
1129-
UpdateBIP9Parameters(Consensus::DeploymentPos(j), nStartTime, nTimeout);
1129+
UpdateVersionBitsParameters(Consensus::DeploymentPos(j), nStartTime, nTimeout);
11301130
found = true;
1131-
LogPrintf("Setting BIP9 activation parameters for %s to start=%ld, timeout=%ld\n", vDeploymentParams[0], nStartTime, nTimeout);
1131+
LogPrintf("Setting version bits activation parameters for %s to start=%ld, timeout=%ld\n", vDeploymentParams[0], nStartTime, nTimeout);
11321132
break;
11331133
}
11341134
}

test/functional/p2p-compactblocks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self):
9898
self.setup_clean_chain = True
9999
# Node0 = pre-segwit, node1 = segwit-aware
100100
self.num_nodes = 2
101-
self.extra_args = [["-bip9params=segwit:0:0"], ["-txindex"]]
101+
self.extra_args = [["-vbparams=segwit:0:0"], ["-txindex"]]
102102
self.utxos = []
103103

104104
def build_block_on_tip(self, node, segwit=False):

test/functional/p2p-segwit.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def __init__(self):
114114
super().__init__()
115115
self.setup_clean_chain = True
116116
self.num_nodes = 3
117-
self.extra_args = [["-whitelist=127.0.0.1"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0"], ["-whitelist=127.0.0.1", "-bip9params=segwit:0:0"]]
117+
self.extra_args = [["-whitelist=127.0.0.1"], ["-whitelist=127.0.0.1", "-acceptnonstdtxn=0"], ["-whitelist=127.0.0.1", "-vbparams=segwit:0:0"]]
118118

119119
def setup_network(self):
120120
self.setup_nodes()

0 commit comments

Comments
 (0)