diff options
author | Luke Dashjr <luke-jr+git@utopios.org> | 2012-06-02 02:33:28 +0000 |
---|---|---|
committer | Luke Dashjr <luke-jr+git@utopios.org> | 2012-08-23 23:20:01 +0000 |
commit | e07c8e9123aa87b7d49c08a7558ea5af63bfcb74 (patch) | |
tree | 1cd125441785b823b1a87bba9d10c407943f6864 /src/qt/transactionrecord.cpp | |
parent | 1bcd3f26c022f7a2fcc1a01df6d9cae0cb13f8d7 (diff) |
Treat generation (mined) transactions less different from receive transactions
- Show address receiving the generation, and include it in the correct "account"
- Multiple entries in listtransactions output if the coinbase has multiple outputs to us
Diffstat (limited to 'src/qt/transactionrecord.cpp')
-rw-r--r-- | src/qt/transactionrecord.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 160973638d..cc60e2732b 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -54,12 +54,7 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet * CTxDestination address; sub.idx = parts.size(); // sequence number sub.credit = txout.nValue; - if (wtx.IsCoinBase()) - { - // Generated - sub.type = TransactionRecord::Generated; - } - else if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) + if (ExtractDestination(txout.scriptPubKey, address) && IsMine(*wallet, address)) { // Received by Bitcoin Address sub.type = TransactionRecord::RecvWithAddress; @@ -71,6 +66,11 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWallet * sub.type = TransactionRecord::RecvFromOther; sub.address = mapValue["from"]; } + if (wtx.IsCoinBase()) + { + // Generated + sub.type = TransactionRecord::Generated; + } parts.append(sub); } |