mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
RPC - Add getbestchainlock (#160)
* RPC - Add getbestchainlock * Add missing markdown file
This commit is contained in:
parent
1b23f2c8e4
commit
471899ae2d
8 changed files with 78 additions and 0 deletions
|
@ -117,6 +117,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
|
|||
{% autocrossref %}
|
||||
|
||||
* [GetBestBlockHash][rpc getbestblockhash]: {{summary_getBestBlockHash}}
|
||||
* [GetBestChainLock][rpc getbestchainlock]: {{summary_getBestChainLock}} {{DASH_NEW0_14_1}}
|
||||
* [GetBlock][rpc getblock]: {{summary_getBlock}} {{DASH_UPDATED0_14_1}}
|
||||
* [GetBlockChainInfo][rpc getblockchaininfo]: {{summary_getBlockChainInfo}} {{DASH_UPDATED0_14_1}}
|
||||
* [GetBlockCount][rpc getblockcount]: {{summary_getBlockCount}}
|
||||
|
|
64
_includes/devdoc/dash-core/rpcs/rpcs/getbestchainlock.md
Normal file
64
_includes/devdoc/dash-core/rpcs/rpcs/getbestchainlock.md
Normal file
|
@ -0,0 +1,64 @@
|
|||
{% comment %}
|
||||
This file is licensed under the MIT License (MIT) available on
|
||||
http://opensource.org/licenses/MIT.
|
||||
{% endcomment %}
|
||||
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/getbestchainlock.md" %}
|
||||
|
||||
<!--__-->
|
||||
|
||||
##### GetBestChainLock
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% assign summary_getBestChainLock="returns the block hash of the best chainlock." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
The `getbestchainlock` RPC {{summary_getBestChainLock}}
|
||||
|
||||
Throws an error if there is no known chainlock yet.
|
||||
|
||||
*Parameters: none*
|
||||
|
||||
*Result*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "object/null"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "An object containing the requested block, or JSON `null` if an error occurred"
|
||||
|
||||
- n: "→<br>`blockhash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hash of the block encoded as hex in RPC byte order."
|
||||
|
||||
- n: "→<br>`height`"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The height of this block on its block chain"
|
||||
|
||||
- n: "→<br>`known_block`"
|
||||
t: "boolean"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "True if the block is known by this node"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.14.1*
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -testnet getbestchainlock
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
{% highlight json %}
|
||||
{
|
||||
"blockhash": "000000000036ab34d3005941d4224fc5887526355c98b769e27e5ece05f48860",
|
||||
"height": 182106,
|
||||
"known_block": true
|
||||
}
|
||||
{% endhighlight %}
|
||||
|
||||
*See also: none*
|
||||
|
||||
{% endautocrossref %}
|
Loading…
Add table
Add a link
Reference in a new issue