From 0581c5b62043a625779b9f76ff00f1ed5b48d126 Mon Sep 17 00:00:00 2001 From: thephez Date: Mon, 8 Apr 2019 15:47:43 -0400 Subject: [PATCH] RPC - listunspent update Related to dashpay/dash#2727 --- .../devdoc/dash-core/rpcs/quick-reference.md | 2 +- .../devdoc/dash-core/rpcs/rpcs/listunspent.md | 26 ++++++++++++------- _includes/layout/base/rpc-table.html | 2 +- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/_includes/devdoc/dash-core/rpcs/quick-reference.md b/_includes/devdoc/dash-core/rpcs/quick-reference.md index c356924d..cf24d6c2 100644 --- a/_includes/devdoc/dash-core/rpcs/quick-reference.md +++ b/_includes/devdoc/dash-core/rpcs/quick-reference.md @@ -307,7 +307,7 @@ default. * [ListReceivedByAddress][rpc listreceivedbyaddress]: {{summary_listReceivedByAddress}} {{DASH_UPDATED0_13_0}} * [ListSinceBlock][rpc listsinceblock]: {{summary_listSinceBlock}} {{DASH_UPDATED0_14_0}} * [ListTransactions][rpc listtransactions]: {{summary_listTransactions}} {{DASH_UPDATED0_14_0}} -* [ListUnspent][rpc listunspent]: {{summary_listUnspent}} {{DASH_UPDATED0_12_3}} {{UPDATED0_13_0}} +* [ListUnspent][rpc listunspent]: {{summary_listUnspent}} {{DASH_UPDATED0_14_0}} * [LockUnspent][rpc lockunspent]: {{summary_lockUnspent}} * [Move][rpc move]: {{summary_move}} {{DEPRECATED}} * [RemovePrunedFunds][rpc removeprunedfunds]: {{summary_removePrunedFunds}} {{DASH_NEW0_12_3}} {{NEW0_13_0}} diff --git a/_includes/devdoc/dash-core/rpcs/rpcs/listunspent.md b/_includes/devdoc/dash-core/rpcs/rpcs/listunspent.md index 11a5ce3d..8b89dbb3 100644 --- a/_includes/devdoc/dash-core/rpcs/rpcs/listunspent.md +++ b/_includes/devdoc/dash-core/rpcs/rpcs/listunspent.md @@ -60,7 +60,7 @@ the *spendable* field in the results described below. - n: "Include Unsafe" t: "bool" p: "Optional
(false or true)" - d: "Include outputs that are not safe to spend because they come from unconfirmed untrusted transactions or unconfirmed replacement transactions (cases where we are less sure that a conflicting transaction won't be mined). Default is `true`" + d: "Include outputs that are not safe to spend . See description of `safe` attribute below. Default is `true`" {% enditemplate %} @@ -133,9 +133,14 @@ the *spendable* field in the results described below. p: "Required
(exactly 1)" d: "The number of PrivateSend rounds" +- n: "→ →
`safe`" + t: "bool" + p: "Required
(exactly 1)" + d: "*Added in Bitcoin Core 0.15.0*

Whether this output is considered safe to spend. Unconfirmed transactions from outside keys and unconfirmed replacement transactions are considered unsafe and are not eligible for spending by `fundrawtransaction` and `sendtoaddress`." + {% enditemplate %} -*Example from Dash Core 0.12.3* +*Example from Dash Core 0.14.0* Get all outputs confirmed at least 6 times for a particular address: @@ -143,7 +148,7 @@ address: {% highlight bash %} dash-cli -testnet listunspent 6 99999999 ''' [ - "yXGNabkdQ3JZ7LZ9RCnFe5dqhtBA3hVmU8" + "yLki4jbxX28JB3TThm1DTgRfbKVhhiMx3d" ] ''' {% endhighlight %} @@ -153,15 +158,16 @@ Result: {% highlight json %} [ { - "txid": "0e86f58c56648175362443c1ef28e473acb4c4adc1b3f7983deaddfa3a61a4d7", - "vout": 4, - "address": "yXGNabkdQ3JZ7LZ9RCnFe5dqhtBA3hVmU8", - "scriptPubKey": "76a91478149277b5d820b04e60cbf96ff81fd1ccc6533388ac", - "amount": 0.01000010, - "confirmations": 609, + "txid": "534fe12e360773dddf8aa125a4027d2d8c0073e13ff2f04fd733202b85dbdcf1", + "vout": 0, + "address": "yLki4jbxX28JB3TThm1DTgRfbKVhhiMx3d", + "scriptPubKey": "76a91404c719ccf48d39d3e6253ac98edaf2b5d24f0c0588ac", + "amount": 1.00001000, + "confirmations": 85, "spendable": true, "solvable": true, - "ps_rounds": 5 + "safe": true, + "ps_rounds": 13 } ] {% endhighlight %} diff --git a/_includes/layout/base/rpc-table.html b/_includes/layout/base/rpc-table.html index 1b9a5c11..d565d3a3 100644 --- a/_includes/layout/base/rpc-table.html +++ b/_includes/layout/base/rpc-table.html @@ -779,7 +779,7 @@ th.tg-sort-header::-moz-selection { background:transparent; }th.tg-sort-header:: Wallet ListUnspent Y - Updated in 0.12.3.0 + Updated in 0.14.0 Wallet