diff --git a/doc/release-notes-5624.md b/doc/release-notes-5624.md new file mode 100644 index 000000000000..41923d3df008 --- /dev/null +++ b/doc/release-notes-5624.md @@ -0,0 +1,4 @@ +Updated RPCs +------------ + +- `getblockchaininfo` RPC returns the field `activation_height` for each softforks in `locked_in` status: indicating the expected activation height. diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 3a7717cd689a..377d55e18e93 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -1628,6 +1628,9 @@ static void BIP9SoftForkDescPushBack(const CBlockIndex* active_chain_tip, UniVal statsUV.pushKV("possible", statsStruct.possible); bip9.pushKV("statistics", statsUV); } + else if (ThresholdState::LOCKED_IN == thresholdState) { + bip9.pushKV("activation_height", since_height + static_cast(consensusParams.vDeployments[id].nWindowSize)); + } UniValue rv(UniValue::VOBJ); rv.pushKV("type", "bip9"); @@ -1673,6 +1676,7 @@ UniValue getblockchaininfo(const JSONRPCRequest& request) {RPCResult::Type::NUM_TIME, "start_time", "the minimum median time past of a block at which the bit gains its meaning"}, {RPCResult::Type::NUM_TIME, "timeout", "the median time past of a block at which the deployment is considered failed if not yet locked in"}, {RPCResult::Type::NUM, "since", "height of the first block to which the status applies"}, + {RPCResult::Type::NUM, "activation_height", "expected activation height for this softfork (only for \"locked_in\" status)"}, {RPCResult::Type::OBJ, "statistics", "numeric statistics about BIP9 signalling for a softfork", { {RPCResult::Type::NUM, "period", "the length in blocks of the BIP9 signalling period"},