From 8c5533c7a953e79b423b465905dbfaa45ad60a49 Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 12 May 2022 14:03:01 +0200 Subject: [PATCH 1/2] rpc: remove deprecated "softforks" field from getblockchaininfo --- src/rpc/blockchain.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index cd06a849304..bcaea0ade24 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -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 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; }, From a01b92ad8672dcf4369ee9cf36a6b0157d73786c Mon Sep 17 00:00:00 2001 From: Sebastian Falbesoner Date: Thu, 12 May 2022 14:15:42 +0200 Subject: [PATCH 2/2] doc: add release notes about removal of the `deprecatedrpc=softforks` flag --- doc/release-notes.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/release-notes.md b/doc/release-notes.md index 8462714898d..f9e712ed8d0 100644 --- a/doc/release-notes.md +++ b/doc/release-notes.md @@ -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.