mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
Merge bitcoin/bitcoin#25114: rpc: remove deprecated "softforks" field from getblockchaininfo
a01b92ad86
doc: add release notes about removal of the `deprecatedrpc=softforks` flag (Sebastian Falbesoner)8c5533c7a9
rpc: remove deprecated "softforks" field from getblockchaininfo (Sebastian Falbesoner) Pull request description: Information on soft fork status has been moved from the `getblockchaininfo` RPC to the `getdeploymentinfo` RPC in #23508. The "softfork" result in `getblockchaininfo` was still available for 23.0 with the `-deprecatedrpc=softforks` configuration option, but this can be fully removed now for the next release (24.0). ACKs for top commit: shaavan: ACKa01b92ad86
ajtowns: ACKa01b92ad86
Tree-SHA512: 692d9d02fdf0b3c18376644a85b24b57efebf612738084c01ef47d47e41861e773688613a808e81f10ab6eec340de00eef96987a1e34d612aaf7f0a0b134d89e
This commit is contained in:
commit
8270740bef
2 changed files with 4 additions and 17 deletions
|
@ -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.
|
||||
|
||||
|
|
|
@ -1149,16 +1149,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",
|
||||
{},
|
||||
|
@ -1180,12 +1173,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{
|
||||
|
@ -1225,10 +1212,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