mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 17:56:16 +00:00
Add GetBlockhashes details
Minor correction in Empty RPC generation script
This commit is contained in:
parent
ac3b27cd7f
commit
19de466c40
2 changed files with 66 additions and 4 deletions
|
@ -2,13 +2,75 @@
|
|||
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/getblockhashes.md" %}#
|
||||
{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/getblockhashes.md" %}
|
||||
|
||||
##### GetBlockHashes
|
||||
{% include helpers/subhead-links.md %}
|
||||
|
||||
{% assign summary_getBlockHashes="returns array of hashes of blocks within the timestamp range provided." %}
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
{% assign summary_getBlockHashes= %}
|
||||
The `getblockhashes` RPC {{summary_getBlockHashes}}
|
||||
|
||||
*Parameter #1---high block timestamp*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Block Timestamp"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The block timestamp for the newest block hash that should be returned."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Parameter #2---low block timestamp*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "Block Timestamp"
|
||||
t: "number (int)"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The block timestamp for the oldest block hash that should be returned."
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Result---the block header hashes in the give time range*
|
||||
|
||||
{% itemplate ntpd1 %}
|
||||
- n: "`result`"
|
||||
t: "array"
|
||||
p: "Required<br>(exactly 1)"
|
||||
d: "The hashes of the blocks in the requested time range"
|
||||
|
||||
- n: "→<br>`hash`"
|
||||
t: "string (hex)"
|
||||
p: "Required<br>(1 or more)"
|
||||
d: "The hash of a block in the chain, encoded as hex in RPC byte order"
|
||||
|
||||
{% enditemplate %}
|
||||
|
||||
*Example from Dash Core 0.12.2*
|
||||
|
||||
{% highlight bash %}
|
||||
dash-cli -testnet getblockhashes 1507555793 1507554793
|
||||
{% endhighlight %}
|
||||
|
||||
Result:
|
||||
|
||||
{% highlight json %}
|
||||
[
|
||||
"0000000010a16c6fbc6bd5cdc238c2beabcda334e97fde1500d59be4e6fc4b89",
|
||||
"000000009910885e811230c403e55aac6547d6df04ee671b2e8348524f73cab8",
|
||||
"000000004bbb3828db1c4d4491760336cec215087819ab656336f30d4095e3d2",
|
||||
"00000000ad2df2149aca2261a9a87c41e139dfe8f73d91db7ec0c1837fee21a0",
|
||||
"0000000074068a9e3a271d165da3deb28bc3f8c751dde97f460d8078d92a9d06"
|
||||
]
|
||||
{% endhighlight %}
|
||||
|
||||
*See also*
|
||||
|
||||
* [GetBlock][rpc getblock]: {{summary_getBlock}}
|
||||
* [GetBlockHash][rpc getblockhash]: {{summary_getBlockHash}}
|
||||
* [GetBestBlockHash][rpc getbestblockhash]: {{summary_getBestBlockHash}}
|
||||
|
||||
|
||||
{% endautocrossref %}
|
||||
|
|
|
@ -12,9 +12,9 @@ if [ "$PARAMCOUNT" == 1 ]; then
|
|||
echo "This file is licensed under the MIT License (MIT) available on" >> $FILENAME
|
||||
echo "http://opensource.org/licenses/MIT." >> $FILENAME
|
||||
echo "{% endcomment %}" >> $FILENAME
|
||||
echo '{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/'$FILENAME'" %}#' >> $FILENAME
|
||||
echo '{% assign filename="_includes/devdoc/dash-core/rpcs/rpcs/'$FILENAME'" %}' >> $FILENAME
|
||||
echo "" >> $FILENAME
|
||||
echo "##### '$RPCNAME'" >> $FILENAME
|
||||
echo "##### $RPCNAME" >> $FILENAME
|
||||
echo "{% include helpers/subhead-links.md %}" >> $FILENAME
|
||||
echo "" >> $FILENAME
|
||||
echo "{% autocrossref %}" >> $FILENAME
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue