mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 01:36:13 +00:00
Dev Docs: Describe New RPC 'generate' In Examples
This commit is contained in:
parent
ab7ca1f26f
commit
df2f3a77d0
2 changed files with 13 additions and 1 deletions
|
@ -64,12 +64,16 @@ Start `bitcoind` in regtest mode to create a private block chain.
|
|||
{% endautocrossref %}
|
||||
|
||||
~~~
|
||||
## Bitcoin Core 0.10.1 and earlier
|
||||
bitcoin-cli -regtest setgenerate true 101
|
||||
|
||||
## Bitcoin Core master (as of commit 48265f3)
|
||||
bitcoin-cli -regtest generate 101
|
||||
~~~
|
||||
|
||||
{% autocrossref %}
|
||||
|
||||
Generate 101 blocks using a special version of the `setgenerate` RPC
|
||||
Generate 101 blocks using a special RPC
|
||||
which is only available in regtest mode. This takes about 30 seconds on
|
||||
a generic PC. Because this is a new block chain using Bitcoin's default
|
||||
rules, the first blocks pay a block reward of 50 bitcoins. Unlike
|
||||
|
|
|
@ -115,8 +115,12 @@ someone else, that second transaction would not be displayed in our
|
|||
list of UTXOs.
|
||||
|
||||
{% highlight bash %}
|
||||
## Bitcoin Core 0.10.1 and earlier
|
||||
> bitcoin-cli -regtest setgenerate true 1
|
||||
|
||||
## Later versions of Bitcoin Core
|
||||
> bitcoin-cli -regtest generate 1
|
||||
|
||||
> unset NEW_ADDRESS
|
||||
{% endhighlight %}
|
||||
|
||||
|
@ -332,8 +336,12 @@ would usually then broadcast it to other peers, but we're not currently
|
|||
connected to other peers because we started in regtest mode.
|
||||
|
||||
{% highlight bash %}
|
||||
## Bitcoin Core 0.10.1 and earlier
|
||||
> bitcoin-cli -regtest setgenerate true 1
|
||||
|
||||
## Later versions of Bitcoin Core
|
||||
> bitcoin-cli -regtest generate 1
|
||||
|
||||
> unset UTXO_TXID UTXO_VOUT NEW_ADDRESS RAW_TX SIGNED_RAW_TX
|
||||
{% endhighlight %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue