From eaeef9d2d988b6eeb2c5773f8c533d4da1eb583c Mon Sep 17 00:00:00 2001 From: Michael Rotarius Date: Thu, 4 May 2017 21:09:13 +0200 Subject: [PATCH] Added PreciousBlock rpc command --- .../bitcoin-core/rpcs/rpcs/preciousblock.md | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 _includes/devdoc/bitcoin-core/rpcs/rpcs/preciousblock.md diff --git a/_includes/devdoc/bitcoin-core/rpcs/rpcs/preciousblock.md b/_includes/devdoc/bitcoin-core/rpcs/rpcs/preciousblock.md new file mode 100644 index 00000000..80397e35 --- /dev/null +++ b/_includes/devdoc/bitcoin-core/rpcs/rpcs/preciousblock.md @@ -0,0 +1,47 @@ +{% 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/preciousblock.md" %} + +##### PreciousBlock +{% include helpers/subhead-links.md %} + +{% assign summary_preciousBlock="treats a block as if it were received before others with the same work." %} + +{% autocrossref %} + +*Added in Bitcoin Core 0.14.0* + +The `preciousblock` RPC {{summary_preciousBlock}} A later `preciousblock` call can override the effect of an earlier one. The effects of `preciousblock` are not retained across restarts. + +*Parameter #1---the block hash* + +{% itemplate ntpd1 %} +- n: "Header Hash" + t: "string (hex)" + p: "Required
(exactly 1)" + d: "The hash of the block to mark as precious" + +{% enditemplate %} + +*Result---`null` plus error on failed remove* + +{% itemplate ntpd1 %} +- n: "`result`" + t: "null" + p: "Required
(exactly 1)" + d: "JSON `null`. The JSON-RPC error field will be set only if you entered an invalid block hash" + +{% enditemplate %} + +*Examples from Bitcoin Core 0.14.1* + +{% highlight bash %} +bitcoin-cli preciousblock 000000000000000001517a0bac70b8cd6f27ee\ +1b50a8f12bf606ea6fb6d561cd +{% endhighlight %} + +Result (no output from `bitcoin-cli` because result is set to `null`). + +{% endautocrossref %}