mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-10 04:33:59 +01:00
rpc: remove deprecated "softforks" field from getblockchaininfo
This commit is contained in:
@@ -1150,16 +1150,9 @@ static void SoftForkDescPushBack(const CBlockIndex* blockindex, UniValue& softfo
|
|||||||
softforks.pushKV(DeploymentName(id), rv);
|
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
|
// used by rest.cpp:rest_chaininfo, so cannot be static
|
||||||
RPCHelpMan getblockchaininfo()
|
RPCHelpMan getblockchaininfo()
|
||||||
{
|
{
|
||||||
/* TODO: from v24, remove -deprecatedrpc=softforks */
|
|
||||||
return RPCHelpMan{"getblockchaininfo",
|
return RPCHelpMan{"getblockchaininfo",
|
||||||
"Returns an object containing various state info regarding blockchain processing.\n",
|
"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::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::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::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"},
|
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
|
||||||
}},
|
}},
|
||||||
RPCExamples{
|
RPCExamples{
|
||||||
@@ -1226,10 +1213,6 @@ RPCHelpMan getblockchaininfo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IsDeprecatedRPCEnabled("softforks")) {
|
|
||||||
obj.pushKV("softforks", DeploymentInfo(&tip, chainman));
|
|
||||||
}
|
|
||||||
|
|
||||||
obj.pushKV("warnings", GetWarnings(false).original);
|
obj.pushKV("warnings", GetWarnings(false).original);
|
||||||
return obj;
|
return obj;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user