Skip to content

Commit 1a02edb

Browse files
committed
[RPC] Fix casing in getblockchaininfo to be inline with the rest of the response
The response in the RPC result `starttime` is camel cased while the rest of the response seems to be lower cased. If this was intentional please ignore this PR. Note: case might break existing callers Reflect the change in the test data Change to snake case
1 parent 4c329d4 commit 1a02edb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rpc/blockchain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,7 +1159,7 @@ static void BIP9SoftForkDescPushBack(UniValue& softforks, const std::string &nam
11591159
{
11601160
bip9.pushKV("bit", consensusParams.vDeployments[id].bit);
11611161
}
1162-
bip9.pushKV("startTime", consensusParams.vDeployments[id].nStartTime);
1162+
bip9.pushKV("start_time", consensusParams.vDeployments[id].nStartTime);
11631163
bip9.pushKV("timeout", consensusParams.vDeployments[id].nTimeout);
11641164
int64_t since_height = VersionBitsTipStateSinceHeight(consensusParams, id);
11651165
bip9.pushKV("since", since_height);
@@ -1213,7 +1213,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request)
12131213
" \"bip9\": { (object) status of bip9 softforks (only for \"bip9\" type)\n"
12141214
" \"status\": \"xxxx\", (string) one of \"defined\", \"started\", \"locked_in\", \"active\", \"failed\"\n"
12151215
" \"bit\": xx, (numeric) the bit (0-28) in the block version field used to signal this softfork (only for \"started\" status)\n"
1216-
" \"startTime\": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning\n"
1216+
" \"start_time\": xx, (numeric) the minimum median time past of a block at which the bit gains its meaning\n"
12171217
" \"timeout\": xx, (numeric) the median time past of a block at which the deployment is considered failed if not yet locked in\n"
12181218
" \"since\": xx, (numeric) height of the first block to which the status applies\n"
12191219
" \"statistics\": { (object) numeric statistics about BIP9 signalling for a softfork\n"

test/functional/rpc_blockchain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _test_getblockchaininfo(self):
134134
'bip9': {
135135
'status': 'started',
136136
'bit': 28,
137-
'startTime': 0,
137+
'start_time': 0,
138138
'timeout': 0x7fffffffffffffff, # testdummy does not have a timeout so is set to the max int64 value
139139
'since': 144,
140140
'statistics': {

0 commit comments

Comments
 (0)