From 406050e8fe76a4aa0e5fd362bb72c1a80f63b37f Mon Sep 17 00:00:00 2001 From: Michael Rotarius Date: Thu, 4 May 2017 21:09:00 +0200 Subject: [PATCH] Added PrunedBlockchain rpc command --- .../bitcoin-core/rpcs/rpcs/pruneblockchain.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 _includes/devdoc/bitcoin-core/rpcs/rpcs/pruneblockchain.md diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/pruneblockchain.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/pruneblockchain.md new file mode 100644 index 00000000..d15acb03 --- /dev/null +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/pruneblockchain.md @@ -0,0 +1,54 @@ +{% comment %} +This file is licensed under the MIT License (MIT) available on +http://opensource.org/licenses/MIT. +{% endcomment %} +{% assign filename="_includes/devdoc/bitcoin-core/rpcs/rpcs/pruneblockchain.md" %} + +##### PruneBlockChain +{% include helpers/subhead-links.md %} + +{% assign summary_pruneBlockChain="prunes the blockchain up to a specified height or timestamp." %} + +{% autocrossref %} + +*Added in Bitcoin Core 0.14.0* + +The `pruneblockchain` RPC {{summary_pruneBlockChain}} The `-prune` option needs to be enabled (disabled by default). + +*Parameter #1---the block height or timestamp* + +{% itemplate ntpd1 %} +- n: "Height" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The block height to prune up to. May be set to a discrete height, or a unix timestamp to prune blocks whose block time is at least 2 hours older than the provided timestamp" + +{% enditemplate %} + +*Result---the height of the last block pruned* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "number (int)" + p: "Required
(exactly 1)" + d: "The height of the last block pruned" + +{% enditemplate %} + +*Examples from Bitcoin Core 0.14.1* + +{% highlight bash %} +bitcoin-cli pruneblockchain 413555 +{% endhighlight %} + +Result: + +{% highlight text %} +413555 +{% endhighlight %} + +*See also* + +* [ImportPrunedFunds][rpc importprunedfunds]: {{summary_importPrunedFunds}} + +{% endautocrossref %}