Skip to content

Commit 135a0f0

Browse files
committed
doc: Add missing top-level description to pruneblockchain RPC
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 concise top-level description, improving documentation consistency and alerting users to the potential impacts of using the command.
1 parent 9efe546 commit 135a0f0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rpc/blockchain.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,9 @@ std::optional<int> GetPruneHeight(const BlockManager& blockman, const CChain& ch
854854

855855
static RPCHelpMan pruneblockchain()
856856
{
857-
return RPCHelpMan{"pruneblockchain", "",
857+
return RPCHelpMan{"pruneblockchain",
858+
"Attempts to delete block and undo data up to a specified height or timestamp, if eligible for pruning.\n"
859+
"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",
858860
{
859861
{"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"
860862
" to prune blocks whose block time is at least 2 hours older than the provided timestamp."},

0 commit comments

Comments
 (0)