Merge 8270740bef into merged_master (Bitcoin PR bitcoin/bitcoin#25114)

This commit is contained in:
James Dorfman 2024-08-12 04:44:05 +00:00
commit a738660dbd
2 changed files with 4 additions and 17 deletions

View file

@ -50,6 +50,10 @@ P2P and network changes
Updated RPCs
------------
- The `-deprecatedrpc=softforks` configuration option has been removed. The
RPC `getblockchaininfo` no longer returns the `softforks` field, which was
previously deprecated in 23.0. (#23508) Information on soft fork status is
now only available via the `getdeploymentinfo` RPC.
Changes to wallet related RPCs can be found in the Wallet section below.

View file

@ -1290,16 +1290,9 @@ static void SoftForkDescPushBack(const CBlockIndex* blockindex, UniValue& softfo
softforks.pushKV(DeploymentName(id), rv);
}
namespace {
/* TODO: when -deprecatedrpc=softforks is removed, drop these */
UniValue DeploymentInfo(const CBlockIndex* tip, const ChainstateManager& chainman);
extern const std::vector<RPCResult> RPCHelpForDeployment;
}
// used by rest.cpp:rest_chaininfo, so cannot be static
RPCHelpMan getblockchaininfo()
{
/* TODO: from v24, remove -deprecatedrpc=softforks */
return RPCHelpMan{"getblockchaininfo",
"Returns an object containing various state info regarding blockchain processing.\n",
{},
@ -1337,12 +1330,6 @@ RPCHelpMan getblockchaininfo()
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "height of the last block pruned, plus one (only present if pruning is enabled)"},
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
{RPCResult::Type::OBJ_DYN, "softforks", /*optional=*/true, "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
{
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
RPCHelpForDeployment
},
}},
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
}},
RPCExamples{
@ -1419,10 +1406,6 @@ RPCHelpMan getblockchaininfo()
}
}
if (IsDeprecatedRPCEnabled("softforks")) {
obj.pushKV("softforks", DeploymentInfo(&tip, chainman));
}
obj.pushKV("warnings", GetWarnings(false).original);
return obj;
},