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:
parent
225e5b57b2
commit
8c5533c7a9
1 changed files with 0 additions and 17 deletions
|
@ -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;
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue