You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove dummy confirmations in RPC API and GUI for InstantSend transactions (#2040)
* remove instandsenddepth option
* remove CInstantSend::GetConfirmations
* Explicit IXlocks processing in the code using GetDepthInMainChain
* remove dummy confirmations for IX locks
* remove unused constant
* Track IS status in TransactionStatus
* Highlight IS in tx list
* Customize confirmation icons for IS txes
* Fix issues:
- bring back removed comment;
- simplify 2 complex condition to ose `IsTrusted()` function only;
- rename `IsLockedIX` function to 'IsLockedByInstantSend`;
* Revert condition with IsTrusted()
* code style fix
* remove dummy confirmations from instantsend.md
* fix instantsend.md
Copy file name to clipboardExpand all lines: doc/instantsend.md
+1-53Lines changed: 1 addition & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,56 +25,4 @@ When a wallet InstantSend transaction is successfully locked a shell command pro
25
25
26
26
#### RPC
27
27
28
-
Details pertaining to an observed "Transaction Lock" can also be retrieved through RPC, it’s important however to understand the underlying mechanism.
29
-
30
-
By default, the Dash Core daemon will launch using the following constant:
31
-
32
-
```
33
-
static const int DEFAULT_INSTANTSEND_DEPTH = 5;
34
-
```
35
-
36
-
This value can be overridden by passing the following argument to the Dash Core daemon:
37
-
38
-
```
39
-
-instantsenddepth=<n>
40
-
```
41
-
42
-
The key thing to understand is that this value indicates the number of "confirmations" a successful Transaction Lock represents. When Wallet RPC commands which support `minconf` and `addlockconf` parameters (such as `listreceivedbyaddress`) are performed and `addlockconf` is `true`, then `instantsenddepth` attribute is taken into account when returning information about the transaction. In this case the value in `confirmations` field you see through RPC is showing the number of `"Blockchain Confirmations" + "InstantSend Depth"` (assuming the funds were sent via InstantSend).
43
-
44
-
There is also a field named `instantlock` (that is present in commands such as `listsinceblock`). The value in this field indicates whether a given transaction is locked via InstantSend.
45
-
46
-
**Examples**
47
-
48
-
1.`listreceivedbyaddress 0 true`
49
-
* InstantSend transaction just occurred:
50
-
* confirmations: 5
51
-
* InstantSend transaction received one confirmation from blockchain:
52
-
* confirmations: 6
53
-
* non-InstantSend transaction just occurred:
54
-
* confirmations: 0
55
-
* non-InstantSend transaction received one confirmation from blockchain:
56
-
* confirmations: 1
57
-
58
-
2.`listreceivedbyaddress 0`
59
-
* InstantSend transaction just occurred:
60
-
* confirmations: 0
61
-
* InstantSend transaction received one confirmation from blockchain:
62
-
* confirmations: 1
63
-
* non-InstantSend transaction just occurred:
64
-
* confirmations: 0
65
-
* non-InstantSend transaction received one confirmation from blockchain:
66
-
* confirmations: 1
67
-
68
-
3.`listsinceblock`
69
-
* InstantSend transaction just occurred:
70
-
* confirmations: 0
71
-
* instantlock: true
72
-
* InstantSend transaction received one confirmation from blockchain:
73
-
* confirmations: 1
74
-
* instantlock: true
75
-
* non-InstantSend transaction just occurred:
76
-
* confirmations: 0
77
-
* instantlock: false
78
-
* non-InstantSend transaction received one confirmation from blockchain:
79
-
* confirmations: 1
80
-
* instantlock: false
28
+
Details pertaining to an observed "Transaction Lock" can also be retrieved through RPC. There is a boolean field named `instantlock` which indicates whether a given transaction is locked via InstantSend. This field is present in the output of some wallet RPC commands e.g. `listsinceblock`, `gettransaction` etc. as well as in the output of some mempool RPC commands e.g. `getmempoolentry` and a couple of others like `getrawmempool` (for `verbose=true` only).
strError = strprintf("Collateral requires at least %d confirmations to be relayed throughout the network (it has only %d)", GOVERNANCE_FEE_CONFIRMATIONS, nConfirmationsIn);
621
622
if (nConfirmationsIn >= GOVERNANCE_MIN_RELAY_FEE_CONFIRMATIONS) {
strUsage += HelpMessageOpt("-enableinstantsend=<n>", strprintf(_("Enable InstantSend, show confirmations for locked transactions (0-1, default: %u)"), 1));
579
-
strUsage += HelpMessageOpt("-instantsenddepth=<n>", strprintf(_("Show N confirmations for a successfully locked transaction (%u-%u, default: %u)"), MIN_INSTANTSEND_DEPTH, MAX_INSTANTSEND_DEPTH, DEFAULT_INSTANTSEND_DEPTH));
580
579
strUsage += HelpMessageOpt("-instantsendnotify=<cmd>", _("Execute command when a wallet InstantSend transaction is successfully locked (%s in cmd is replaced by TxID)"));
0 commit comments