Skip to content

Commit e04720e

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#24528: rpc: rename getdeploymentinfo status-next to status_next
5d7c69b rpc: rename getdeploymentinfo status-next to status_next (Jon Atack) Pull request description: Rename the `status-next` field to `status_next` in getdeploymentinfo before the RPC is released in v23. Before ``` Result: { (json object) "hash" : "str", (string) requested block hash (or tip) "height" : n, (numeric) requested block height (or tip) "deployments" : { (json object) "xxxx" : { (json object) name of the deployment "type" : "str", (string) one of "buried", "bip9" "height" : n, (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) "active" : true|false, (boolean) true if the rules are enforced for the mempool and the next block "bip9" : { (json object, optional) status of bip9 softforks (only for "bip9" type) "bit" : n, (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status) "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in "min_activation_height" : n, (numeric) minimum height of blocks for which the rules may be enforced "status" : "str", (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed") "since" : n, (numeric) height of the first block to which the status applies "status-next" : "str", (string) status of deployment at the next block "statistics" : { (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status) "period" : n, (numeric) the length in blocks of the signalling period "threshold" : n, (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status) "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period "count" : n, (numeric) the number of blocks with the version bit set in the current period "possible" : true|false (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status) }, "signalling" : "str" (string) indicates blocks that signalled with a # and blocks that did not with a - } } } } ``` After ``` Result: { (json object) "hash" : "str", (string) requested block hash (or tip) "height" : n, (numeric) requested block height (or tip) "deployments" : { (json object) "xxxx" : { (json object) name of the deployment "type" : "str", (string) one of "buried", "bip9" "height" : n, (numeric, optional) height of the first block which the rules are or will be enforced (only for "buried" type, or "bip9" type with "active" status) "active" : true|false, (boolean) true if the rules are enforced for the mempool and the next block "bip9" : { (json object, optional) status of bip9 softforks (only for "bip9" type) "bit" : n, (numeric, optional) the bit (0-28) in the block version field used to signal this softfork (only for "started" and "locked_in" status) "start_time" : xxx, (numeric) the minimum median time past of a block at which the bit gains its meaning "timeout" : xxx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in "min_activation_height" : n, (numeric) minimum height of blocks for which the rules may be enforced "status" : "str", (string) status of deployment at specified block (one of "defined", "started", "locked_in", "active", "failed") "since" : n, (numeric) height of the first block to which the status applies "status_next" : "str", (string) status of deployment at the next block "statistics" : { (json object, optional) numeric statistics about signalling for a softfork (only for "started" and "locked_in" status) "period" : n, (numeric) the length in blocks of the signalling period "threshold" : n, (numeric, optional) the number of blocks with the version bit set required to activate the feature (only for "started" status) "elapsed" : n, (numeric) the number of blocks elapsed since the beginning of the current period "count" : n, (numeric) the number of blocks with the version bit set in the current period "possible" : true|false (boolean, optional) returns false if there are not enough blocks left in this period to pass activation threshold (only for "started" status) }, "signalling" : "str" (string) indicates blocks that signalled with a # and blocks that did not with a - } } } } ``` Top commit has no ACKs. Tree-SHA512: 4facfd7af3cfb7b6f5495758c4387602802f5e39d9270b162d17350a7f954eab0b74d895f17f0d8dfbc7814d36db7cff56d08c42728432885ea6f4e37aea4aa8
2 parents 2860a91 + 5d7c69b commit e04720e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ static void SoftForkDescPushBack(const CBlockIndex* blockindex, UniValue& softfo
14811481
// BIP9 status
14821482
bip9.pushKV("status", get_state_name(current_state));
14831483
bip9.pushKV("since", g_versionbitscache.StateSinceHeight(blockindex->pprev, consensusParams, id));
1484-
bip9.pushKV("status-next", get_state_name(next_state));
1484+
bip9.pushKV("status_next", get_state_name(next_state));
14851485

14861486
// BIP9 signalling status, if applicable
14871487
if (has_signal) {
@@ -1623,7 +1623,7 @@ const std::vector<RPCResult> RPCHelpForDeployment{
16231623
{RPCResult::Type::NUM, "min_activation_height", "minimum height of blocks for which the rules may be enforced"},
16241624
{RPCResult::Type::STR, "status", "status of deployment at specified block (one of \"defined\", \"started\", \"locked_in\", \"active\", \"failed\")"},
16251625
{RPCResult::Type::NUM, "since", "height of the first block to which the status applies"},
1626-
{RPCResult::Type::STR, "status-next", "status of deployment at the next block"},
1626+
{RPCResult::Type::STR, "status_next", "status of deployment at the next block"},
16271627
{RPCResult::Type::OBJ, "statistics", /*optional=*/true, "numeric statistics about signalling for a softfork (only for \"started\" and \"locked_in\" status)",
16281628
{
16291629
{RPCResult::Type::NUM, "period", "the length in blocks of the signalling period"},

test/functional/rpc_blockchain.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ def check_signalling_deploymentinfo_result(self, gdi_result, height, blockhash,
200200
'timeout': 0x7fffffffffffffff, # testdummy does not have a timeout so is set to the max int64 value
201201
'min_activation_height': 0,
202202
'status': 'started',
203-
'status-next': status_next,
203+
'status_next': status_next,
204204
'since': 144,
205205
'statistics': {
206206
'period': 144,
@@ -220,7 +220,7 @@ def check_signalling_deploymentinfo_result(self, gdi_result, height, blockhash,
220220
'timeout': 9223372036854775807,
221221
'min_activation_height': 0,
222222
'status': 'active',
223-
'status-next': 'active',
223+
'status_next': 'active',
224224
'since': 0,
225225
},
226226
'height': 0,

0 commit comments

Comments
 (0)