Skip to content

Commit 8270740

Browse files
author
MacroFake
committed
Merge bitcoin#25114: rpc: remove deprecated "softforks" field from getblockchaininfo
a01b92a doc: add release notes about removal of the `deprecatedrpc=softforks` flag (Sebastian Falbesoner) 8c5533c 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 bitcoin#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: ACK a01b92a ajtowns: ACK a01b92a Tree-SHA512: 692d9d02fdf0b3c18376644a85b24b57efebf612738084c01ef47d47e41861e773688613a808e81f10ab6eec340de00eef96987a1e34d612aaf7f0a0b134d89e
2 parents 91a42d6 + a01b92a commit 8270740

File tree

2 files changed

+4
-17
lines changed

2 files changed

+4
-17
lines changed

doc/release-notes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,10 @@ P2P and network changes
5050
Updated RPCs
5151
------------
5252

53+
- The `-deprecatedrpc=softforks` configuration option has been removed. The
54+
RPC `getblockchaininfo` no longer returns the `softforks` field, which was
55+
previously deprecated in 23.0. (#23508) Information on soft fork status is
56+
now only available via the `getdeploymentinfo` RPC.
5357

5458
Changes to wallet related RPCs can be found in the Wallet section below.
5559

src/rpc/blockchain.cpp

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,16 +1149,9 @@ static void SoftForkDescPushBack(const CBlockIndex* blockindex, UniValue& softfo
11491149
softforks.pushKV(DeploymentName(id), rv);
11501150
}
11511151

1152-
namespace {
1153-
/* TODO: when -deprecatedrpc=softforks is removed, drop these */
1154-
UniValue DeploymentInfo(const CBlockIndex* tip, const ChainstateManager& chainman);
1155-
extern const std::vector<RPCResult> RPCHelpForDeployment;
1156-
}
1157-
11581152
// used by rest.cpp:rest_chaininfo, so cannot be static
11591153
RPCHelpMan getblockchaininfo()
11601154
{
1161-
/* TODO: from v24, remove -deprecatedrpc=softforks */
11621155
return RPCHelpMan{"getblockchaininfo",
11631156
"Returns an object containing various state info regarding blockchain processing.\n",
11641157
{},
@@ -1180,12 +1173,6 @@ RPCHelpMan getblockchaininfo()
11801173
{RPCResult::Type::NUM, "pruneheight", /*optional=*/true, "height of the last block pruned, plus one (only present if pruning is enabled)"},
11811174
{RPCResult::Type::BOOL, "automatic_pruning", /*optional=*/true, "whether automatic pruning is enabled (only present if pruning is enabled)"},
11821175
{RPCResult::Type::NUM, "prune_target_size", /*optional=*/true, "the target size used by pruning (only present if automatic pruning is enabled)"},
1183-
{RPCResult::Type::OBJ_DYN, "softforks", /*optional=*/true, "(DEPRECATED, returned only if config option -deprecatedrpc=softforks is passed) status of softforks",
1184-
{
1185-
{RPCResult::Type::OBJ, "xxxx", "name of the softfork",
1186-
RPCHelpForDeployment
1187-
},
1188-
}},
11891176
{RPCResult::Type::STR, "warnings", "any network and blockchain warnings"},
11901177
}},
11911178
RPCExamples{
@@ -1225,10 +1212,6 @@ RPCHelpMan getblockchaininfo()
12251212
}
12261213
}
12271214

1228-
if (IsDeprecatedRPCEnabled("softforks")) {
1229-
obj.pushKV("softforks", DeploymentInfo(&tip, chainman));
1230-
}
1231-
12321215
obj.pushKV("warnings", GetWarnings(false).original);
12331216
return obj;
12341217
},

0 commit comments

Comments
 (0)