0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-03 09:56:38 -05:00

rpc: remove deprecated "softforks" field from getblockchaininfo

This commit is contained in:
Sebastian Falbesoner 2022-05-12 14:03:01 +02:00
parent 225e5b57b2
commit 8c5533c7a9

View file

@ -1150,16 +1150,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",
{},
@ -1181,12 +1174,6 @@ RPCHelpMan getblockchaininfo()
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "lowest-height complete block stored (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{
@ -1226,10 +1213,6 @@ RPCHelpMan getblockchaininfo()
}
}
if (IsDeprecatedRPCEnabled("softforks")) {
obj.pushKV("softforks", DeploymentInfo(&tip, chainman));
}
obj.pushKV("warnings", GetWarnings(false).original);
return obj;
},