Merge bitcoin/bitcoin#32333: doc: Add missing top-level description to pruneblockchain RPC

135a0f0aa7 doc: Add missing top-level description to pruneblockchain RPC (nervana21)

Pull request description:

  Previously, the `pruneblockchain` RPC help output included only the method signature and arguments, with no top-level description explaining its purpose or constraints.

  This PR adds a top-level description, improving documentation consistency and alerting users to the potential impacts of using the command.

ACKs for top commit:
  maflcko:
    lgtm ACK 135a0f0aa7
  yancyribbens:
    cr ACK 135a0f0aa7
  achow101:
    ACK 135a0f0aa7
  janb84:
    re ACK [135a0f0](135a0f0aa7)

Tree-SHA512: e51475238e779555315668b7389ed312a5d2c4ad1c0b251f2314895ac473092fa458b6f931f70385e14047adb7e340e44fe2198643603da9e129f1c874578a28
This commit is contained in:
Ava Chow
2025-05-20 12:02:54 -07:00

View File

@@ -864,7 +864,9 @@ std::optional<int> GetPruneHeight(const BlockManager& blockman, const CChain& ch
static RPCHelpMan pruneblockchain()
{
return RPCHelpMan{"pruneblockchain", "",
return RPCHelpMan{"pruneblockchain",
"Attempts to delete block and undo data up to a specified height or timestamp, if eligible for pruning.\n"
"Requires `-prune` to be enabled at startup. While pruned data may be re-fetched in some cases (e.g., via `getblockfrompeer`), local deletion is irreversible.\n",
{
{"height", RPCArg::Type::NUM, RPCArg::Optional::NO, "The block height to prune up to. May be set to a discrete height, or to a " + UNIX_EPOCH_TIME + "\n"
" to prune blocks whose block time is at least 2 hours older than the provided timestamp."},