content - Update RPCs

- Update GetBlockChainInfo and GetBlockTemplate
 - Add ImportMulti
 - Some minor generate RPC updates for removed commands
This commit is contained in:
thephez 2018-02-26 12:54:03 -05:00
parent b93ff39716
commit b99321f29a
6 changed files with 85 additions and 77 deletions

View file

@ -98,7 +98,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
* [GetBestBlockHash][rpc getbestblockhash]: {{summary_getBestBlockHash}} * [GetBestBlockHash][rpc getbestblockhash]: {{summary_getBestBlockHash}}
* [GetBlock][rpc getblock]: {{summary_getBlock}} {{UPDATED0_13_0}} * [GetBlock][rpc getblock]: {{summary_getBlock}} {{UPDATED0_13_0}}
* [GetBlockChainInfo][rpc getblockchaininfo]: {{summary_getBlockChainInfo}} {{UPDATED0_12_1}} * [GetBlockChainInfo][rpc getblockchaininfo]: {{summary_getBlockChainInfo}} {{DASH_UPDATED0_12_3}} {{UPDATED0_12_1}}
* [GetBlockCount][rpc getblockcount]: {{summary_getBlockCount}} * [GetBlockCount][rpc getblockcount]: {{summary_getBlockCount}}
* [GetBlockHash][rpc getblockhash]: {{summary_getBlockHash}} * [GetBlockHash][rpc getblockhash]: {{summary_getBlockHash}}
* [GetBlockHashes][rpc getblockhashes]: {{summary_getBlockHashes}} {{DASH_NEW0_12_1}} * [GetBlockHashes][rpc getblockhashes]: {{summary_getBlockHashes}} {{DASH_NEW0_12_1}}
@ -181,7 +181,7 @@ These RPCs are all Dash-specific and not found in Bitcoin Core
{% autocrossref %} {% autocrossref %}
* [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}} * [GetBlockTemplate][rpc getblocktemplate]: {{summary_getBlockTemplate}} {{DASH_UPDATED0_12_3}}
* [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} {{UPDATED0_14_0}} * [GetMiningInfo][rpc getmininginfo]: {{summary_getMiningInfo}} {{UPDATED0_14_0}}
* [GetNetworkHashPS][rpc getnetworkhashps]: {{summary_getNetworkHashPS}} * [GetNetworkHashPS][rpc getnetworkhashps]: {{summary_getNetworkHashPS}}
* [PrioritiseTransaction][rpc prioritisetransaction]: {{summary_prioritiseTransaction}} * [PrioritiseTransaction][rpc prioritisetransaction]: {{summary_prioritiseTransaction}}
@ -273,6 +273,7 @@ default.
* [GetWalletInfo][rpc getwalletinfo]: {{summary_getWalletInfo}} * [GetWalletInfo][rpc getwalletinfo]: {{summary_getWalletInfo}}
* [ImportAddress][rpc importaddress]: {{summary_importAddress}} * [ImportAddress][rpc importaddress]: {{summary_importAddress}}
* [ImportElectrumWallet][rpc importelectrumwallet]: {{summary_importElectrumWallet}} {{DASH_NEW0_12_1}} * [ImportElectrumWallet][rpc importelectrumwallet]: {{summary_importElectrumWallet}} {{DASH_NEW0_12_1}}
* [ImportMulti][rpc importmulti]: {{summary_importMulti}} {{DASH_NEW0_12_3}} {{NEW0_14_0}}
* [ImportPrivKey][rpc importprivkey]: {{summary_importPrivKey}} * [ImportPrivKey][rpc importprivkey]: {{summary_importPrivKey}}
* [ImportPubKey][rpc importpubkey]: {{summary_importPubKey}} * [ImportPubKey][rpc importpubkey]: {{summary_importPubKey}}
* [ImportWallet][rpc importwallet]: {{summary_importWallet}} * [ImportWallet][rpc importwallet]: {{summary_importWallet}}
@ -301,7 +302,6 @@ default.
* {{DASH_NOT_IMPLEMENTED}} [AddWitnessAddress][rpc addwitnessaddress]: {{summary_addWitnessAddress}} {{NEW0_13_0}} * {{DASH_NOT_IMPLEMENTED}} [AddWitnessAddress][rpc addwitnessaddress]: {{summary_addWitnessAddress}} {{NEW0_13_0}}
* {{DASH_NOT_IMPLEMENTED}} [BumpFee][rpc bumpfee]: {{summary_bumpFee}} {{NEW0_14_0}} * {{DASH_NOT_IMPLEMENTED}} [BumpFee][rpc bumpfee]: {{summary_bumpFee}} {{NEW0_14_0}}
* {{DASH_NOT_IMPLEMENTED}} [ImportMulti][rpc importmulti]: {{summary_importMulti}} {{NEW0_14_0}}
* {{DASH_NOT_IMPLEMENTED}} [ImportPrunedFunds][rpc importprunedfunds]: {{summary_importPrunedFunds}} {{NEW0_13_0}} * {{DASH_NOT_IMPLEMENTED}} [ImportPrunedFunds][rpc importprunedfunds]: {{summary_importPrunedFunds}} {{NEW0_13_0}}
* {{DASH_NOT_IMPLEMENTED}} [RemovePrunedFunds][rpc removeprunedfunds]: {{summary_removePrunedFunds}} {{NEW0_13_0}} * {{DASH_NOT_IMPLEMENTED}} [RemovePrunedFunds][rpc removeprunedfunds]: {{summary_removePrunedFunds}} {{NEW0_13_0}}

View file

@ -18,7 +18,7 @@ The `disconnectnode` RPC {{summary_disconnectNode}}
*Parameter #1---hostname/IP address and port of node to disconnect* *Parameter #1---hostname/IP address and port of node to disconnect*
{% itemplate ntpd1 %} {% itemplate ntpd1 %}
- n: "`node`" - n: "`address`"
t: "string" t: "string"
p: "Required<br>(exactly 1)" p: "Required<br>(exactly 1)"
d: "The node you want to disconnect from as a string in the form of `<IP address>:<port>`.<br><br>*Updated in Bitcoin Core 0.14.1*" d: "The node you want to disconnect from as a string in the form of `<IP address>:<port>`.<br><br>*Updated in Bitcoin Core 0.14.1*"

View file

@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
##### GetBlockChainInfo ##### GetBlockChainInfo
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
<!-- __ -->
{% assign summary_getBlockChainInfo="provides information about the current state of the block chain." %} {% assign summary_getBlockChainInfo="provides information about the current state of the block chain." %}
{% autocrossref %} {% autocrossref %}
@ -163,9 +165,23 @@ The `getblockchaininfo` RPC {{summary_getBlockChainInfo}}
p: "Optional<br>(0 or 1)" p: "Optional<br>(0 or 1)"
d: "The bit (0-28) in the block version field used to signal this softfork. Field is only shown when status is `started`" d: "The bit (0-28) in the block version field used to signal this softfork. Field is only shown when status is `started`"
- n: "→ → →<br>`startTime`"
t: "numeric<br>(int)"
p: "Required<br>(exactly 1)"
d: "The Unix epoch time when the softfork voting begins"
- n: "→ → →<br>`timeout`"
t: "numeric<br>(int)"
p: "Required<br>(exactly 1)"
d: "The Unix epoch time at which the deployment is considered failed if not yet locked in"
- n: "→ → →<br>`since`"
t: "numeric<br>(int)"
p: "Required<br>(exactly 1)"
d: "*Added in Bitcoin Core 0.14.0*<br><br>The height of the first block to which the status applies"
{% enditemplate %} {% enditemplate %}
*Example from Dash Core 0.12.2* *Example from Dash Core 0.12.3*
{% highlight bash %} {% highlight bash %}
dash-cli -testnet getblockchaininfo dash-cli -testnet getblockchaininfo
@ -176,74 +192,57 @@ Result:
{% highlight json %} {% highlight json %}
{ {
"chain": "test", "chain": "test",
"blocks": 4622, "blocks": 82244,
"headers": 4622, "headers": 82244,
"bestblockhash": "000000007f4141e557309da09911b1c3c65b8e9eed3f5e940f7083aec8999ac7", "bestblockhash": "0000000004efcadbdb9d8b524e5ab982af3db039fdb585c2f1c1df56d42d4492",
"difficulty": 1.380236305048335, "difficulty": 47.4955836390814,
"mediantime": 1507209819, "mediantime": 1519662782,
"verificationprogress": 0.9999053826626874, "verificationprogress": 0.9999999483744162,
"chainwork": "000000000000000000000000000000000000000000000000000001d17aeaf58b", "chainwork": "0000000000000000000000000000000000000000000000000021adf3af961831",
"pruned": false, "pruned": false,
"softforks": [ "softforks": [
{ {
"id": "bip34", "id": "bip34",
"version": 2, "version": 2,
"enforce": {
"status": true,
"found": 100,
"required": 51,
"window": 100
},
"reject": { "reject": {
"status": true, "status": true
"found": 100,
"required": 75,
"window": 100
} }
}, },
{ {
"id": "bip66", "id": "bip66",
"version": 3, "version": 3,
"enforce": {
"status": true,
"found": 100,
"required": 51,
"window": 100
},
"reject": { "reject": {
"status": true, "status": true
"found": 100,
"required": 75,
"window": 100
} }
}, },
{ {
"id": "bip65", "id": "bip65",
"version": 4, "version": 4,
"enforce": {
"status": true,
"found": 100,
"required": 51,
"window": 100
},
"reject": { "reject": {
"status": true, "status": true
"found": 100,
"required": 75,
"window": 100
} }
} }
], ],
"bip9_softforks": [ "bip9_softforks": {
{ "csv": {
"id": "csv", "status": "active",
"status": "started" "startTime": 1506556800,
"timeout": 1538092800,
"since": 8064
}, },
{ "dip0001": {
"id": "dip0001", "status": "active",
"status": "started" "startTime": 1505692800,
"timeout": 1537228800,
"since": 5600
},
"bip147": {
"status": "active",
"startTime": 1517792400,
"timeout": 1549328400,
"since": 78800
} }
] }
} }
{% endhighlight %} {% endhighlight %}

View file

@ -7,6 +7,8 @@ http://opensource.org/licenses/MIT.
##### GetBlockTemplate ##### GetBlockTemplate
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
<!-- __ -->
{% assign summary_getBlockTemplate="gets a block template or proposal for use with mining software." %} {% assign summary_getBlockTemplate="gets a block template or proposal for use with mining software." %}
{% autocrossref %} {% autocrossref %}
@ -41,6 +43,16 @@ information, please see the following resources:
p: "Optional<br>(exactly 1)" p: "Optional<br>(exactly 1)"
d: "Client side supported feature, `longpoll`, `coinbasetxn`, `coinbasevalue`, `proposal`, `serverlist`, `workid`" d: "Client side supported feature, `longpoll`, `coinbasetxn`, `coinbasevalue`, `proposal`, `serverlist`, `workid`"
- n: "→<br>`rules`"
t: "array (string)"
p: "Optional<br>(0 or more)"
d: "A list of strings"
- n: "→ →<br>Rules"
t: "string"
p: "Optional<br>(exactly 1)"
d: "Client side supported softfork deployment, `csv`, `dip0001`, etc."
{% enditemplate %} {% enditemplate %}
*Result---block template* *Result---block template*

View file

@ -7,15 +7,14 @@ http://opensource.org/licenses/MIT.
##### ImportMulti ##### ImportMulti
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
<!-- __ -->
{% assign summary_importMulti="imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports." %} {% assign summary_importMulti="imports addresses or scripts (with private keys, public keys, or P2SH redeem scripts) and optionally performs the minimum necessary rescan for all imports." %}
{% autocrossref %} {% autocrossref %}
*Added in Bitcoin Core 0.14.0* *Added in Dash Core 0.12.3 / Bitcoin Core 0.14.0*
{{WARNING_ICON}} **_Not implemented in Dash Core (as of 0.12.2)_**
{% comment %}
*Requires wallet support. Wallet must be unlocked.* *Requires wallet support. Wallet must be unlocked.*
The `importmulti` RPC {{summary_importMulti}} The `importmulti` RPC {{summary_importMulti}}
@ -123,27 +122,27 @@ The `importmulti` RPC {{summary_importMulti}}
p: "Optional<br>(0 or 1)" p: "Optional<br>(0 or 1)"
d: "The error code" d: "The error code"
- n: "→ → → <br>`message`" - n: "→ → → <br>`message<!--noref-->`"
t: "string" t: "string"
p: "Optional<br>(0 or 1)" p: "Optional<br>(0 or 1)"
d: "The error message" d: "The error message"
{% enditemplate %} {% enditemplate %}
*Example from Bitcoin Core 0.14.1* *Example from Dash Core 0.12.3*
Import the address 1NL9w5fP9kX2D9ToNZPxaiwFJCngNYEYJo (giving it a label and scanning the entire block chain) and the scriptPubKey 76a9149e857da0a5b397559c78c98c9d3f7f655d19c68688ac (giving a specific timestamp and label): Import the address `ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe` (giving it a label and scanning the entire block chain) and the scriptPubKey `76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac` (giving a specific timestamp and label):
{% highlight bash %} {% highlight bash %}
bitcoin-cli importmulti ' dash-cli importmulti '
[ [
{ {
"scriptPubKey" : { "address": "1NL9w5fP9kX2D9ToNZPxaiwFJCngNYEYJo" }, "scriptPubKey" : { "address": "ycCsAUKsjdmoP4qAXiS1cjYA4ixM48zJWe" },
"timestamp" : 0, "timestamp" : 0,
"label" : "Personal" "label" : "Personal"
}, },
{ {
"scriptPubKey" : "76a9149e857da0a5b397559c78c98c9d3f7f655d19c68688ac", "scriptPubKey" : "76a9146cf5870411edc31ba5630d61c7cddff55b884fda88ac",
"timestamp" : 1493912405, "timestamp" : 1493912405,
"label" : "TestFailure" "label" : "TestFailure"
} }
@ -153,18 +152,18 @@ bitcoin-cli importmulti '
Result (scriptPubKey import failed because `internal` was not set to `true`): Result (scriptPubKey import failed because `internal` was not set to `true`):
{% highlight json %} {% highlight json %}
[ [
{ {
"success": true "success": true
}, },
{ {
"success": false, "success": false,
"error": { "error": {
"code": -8, "code": -8,
"message": "Internal must be set for hex scriptPubKey" "message": "Internal must be set for hex scriptPubKey"
}
} }
] }
]
{% endhighlight %} {% endhighlight %}
*See also* *See also*
@ -173,6 +172,4 @@ Result (scriptPubKey import failed because `internal` was not set to `true`):
* [ImportAddress][rpc importaddress]: {{summary_importAddress}} * [ImportAddress][rpc importaddress]: {{summary_importAddress}}
* [ImportWallet][rpc importwallet]: {{summary_importWallet}} * [ImportWallet][rpc importwallet]: {{summary_importWallet}}
{% endcomment %}
{% endautocrossref %} {% endautocrossref %}

View file

@ -77,7 +77,7 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header::
<td class="tg-yw4l">Blockchain</td> <td class="tg-yw4l">Blockchain</td>
<td class="tg-yw4l"><a href="#getblockchaininfo">GetBlockChainInfo</a></td> <td class="tg-yw4l"><a href="#getblockchaininfo">GetBlockChainInfo</a></td>
<td class="tg-baqh">Y</td> <td class="tg-baqh">Y</td>
<td class="tg-baqh"></td> <td class="tg-baqh">Updated in 0.12.3.0</td>
</tr> </tr>
<tr> <tr>
<td class="tg-b7b8">Blockchain</td> <td class="tg-b7b8">Blockchain</td>
@ -310,20 +310,20 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header::
<tr> <tr>
<td class="tg-b7b8">Removed</td> <td class="tg-b7b8">Removed</td>
<td class="tg-b7b8"><a href="#getgenerate">GetGenerate</a></td> <td class="tg-b7b8"><a href="#getgenerate">GetGenerate</a></td>
<td class="tg-dzk6">Y</td> <td class="tg-dzk6">N</td>
<td class="tg-dzk6">Removed in 0.12.3.0</td> <td class="tg-dzk6">Removed in 0.12.3.0</td>
</tr> </tr>
<tr> <tr>
<td class="tg-yw4l">Removed</td> <td class="tg-yw4l">Removed</td>
<td class="tg-yw4l"><a href="#setgenerate">SetGenerate</a></td> <td class="tg-yw4l"><a href="#setgenerate">SetGenerate</a></td>
<td class="tg-baqh">Y</td> <td class="tg-baqh">N</td>
<td class="tg-baqh">Removed in 0.12.3.0</td> <td class="tg-baqh">Removed in 0.12.3.0</td>
</tr> </tr>
<tr> <tr>
<td class="tg-b7b8">Mining</td> <td class="tg-b7b8">Mining</td>
<td class="tg-b7b8"><a href="#getblocktemplate">GetBlockTemplate</a></td> <td class="tg-b7b8"><a href="#getblocktemplate">GetBlockTemplate</a></td>
<td class="tg-dzk6">Y</td> <td class="tg-dzk6">Y</td>
<td class="tg-dzk6"></td> <td class="tg-dzk6">Updated in 0.12.3.0</td>
</tr> </tr>
<tr> <tr>
<td class="tg-yw4l">Mining</td> <td class="tg-yw4l">Mining</td>
@ -658,8 +658,8 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header::
<tr> <tr>
<td class="tg-b7b8">Wallet</td> <td class="tg-b7b8">Wallet</td>
<td class="tg-b7b8"><a href="#importmulti">ImportMulti</a></td> <td class="tg-b7b8"><a href="#importmulti">ImportMulti</a></td>
<td class="tg-dzk6">N</td> <td class="tg-dzk6">Y</td>
<td class="tg-dzk6">N/A</td> <td class="tg-dzk6">0.12.3.0+</td>
</tr> </tr>
<tr> <tr>
<td class="tg-yw4l">Wallet</td> <td class="tg-yw4l">Wallet</td>