mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
Remove "conflicted" as transaction category.
We were losing information about sent/received by overriding the category in case of a conflicted transaction. Hence, remove the "conflicted" category. Conflicted status of a transaction can still be determined by looking for confirmations<0.
This commit is contained in:
parent
76a77059f3
commit
b96f6a77f8
1 changed files with 2 additions and 8 deletions
|
@ -1114,10 +1114,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
||||||
Object entry;
|
Object entry;
|
||||||
entry.push_back(Pair("account", strSentAccount));
|
entry.push_back(Pair("account", strSentAccount));
|
||||||
MaybePushAddress(entry, s.first);
|
MaybePushAddress(entry, s.first);
|
||||||
if (wtx.GetDepthInMainChain() < 0)
|
entry.push_back(Pair("category", "send"));
|
||||||
entry.push_back(Pair("category", "conflicted"));
|
|
||||||
else
|
|
||||||
entry.push_back(Pair("category", "send"));
|
|
||||||
entry.push_back(Pair("amount", ValueFromAmount(-s.second)));
|
entry.push_back(Pair("amount", ValueFromAmount(-s.second)));
|
||||||
entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
|
entry.push_back(Pair("fee", ValueFromAmount(-nFee)));
|
||||||
if (fLong)
|
if (fLong)
|
||||||
|
@ -1150,10 +1147,7 @@ void ListTransactions(const CWalletTx& wtx, const string& strAccount, int nMinDe
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (wtx.GetDepthInMainChain() < 0)
|
entry.push_back(Pair("category", "receive"));
|
||||||
entry.push_back(Pair("category", "conflicted"));
|
|
||||||
else
|
|
||||||
entry.push_back(Pair("category", "receive"));
|
|
||||||
}
|
}
|
||||||
entry.push_back(Pair("amount", ValueFromAmount(r.second)));
|
entry.push_back(Pair("amount", ValueFromAmount(r.second)));
|
||||||
if (fLong)
|
if (fLong)
|
||||||
|
|
Loading…
Add table
Reference in a new issue