mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 13:03:17 +01:00
Fixed IX confirmation bug for gettransaction
IX confirmations now show up correctly via the RPC interface immediately after IX confirms they are double-spend proof: gettransaction 64c04e06ac058e572cefb5d98728dba21401cb8826f9688cbaf4270adfc6afb2  { "amount" : 0.00000000, "fee" : -0.01000000, "confirmations" : 5, "bcconfirmations" : 0, "txid" : "64c04e06ac058e572cefb5d98728dba21401cb8826f9688cbaf4270adfc6afb2", "walletconflicts" : [ } ... a moment later ...  gettransaction 64c04e06ac058e572cefb5d98728dba21401cb8826f9688cbaf4270adfc6afb2  { "amount" : 0.00000000, "fee" : -0.01000000, "confirmations" : 6, "bcconfirmations" : 1, "blockhash" : "00000000000f850e60431a5a88fba1cd8d3868477056f65493664e2d39c1837c", "blockindex" : 2, "blocktime" : 1443290068, "txid" : "64c04e06ac058e572cefb5d98728dba21401cb8826f9688cbaf4270adfc6afb2", "walletconflicts" : [ ], }
This commit is contained in:
parent
f173a8634f
commit
ac3a0123b7
@ -48,7 +48,7 @@ void EnsureWalletIsUnlocked()
|
|||||||
void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
|
void WalletTxToJSON(const CWalletTx& wtx, Object& entry)
|
||||||
{
|
{
|
||||||
int confirms = wtx.GetDepthInMainChain(false);
|
int confirms = wtx.GetDepthInMainChain(false);
|
||||||
int confirmsTotal = wtx.GetDepthInMainChain();
|
int confirmsTotal = GetIXConfirmations(wtx.GetHash()) + confirms;
|
||||||
entry.push_back(Pair("confirmations", confirmsTotal));
|
entry.push_back(Pair("confirmations", confirmsTotal));
|
||||||
entry.push_back(Pair("bcconfirmations", confirms));
|
entry.push_back(Pair("bcconfirmations", confirms));
|
||||||
if (wtx.IsCoinBase())
|
if (wtx.IsCoinBase())
|
||||||
|
Loading…
Reference in New Issue
Block a user