Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show First 20 Lines • Show All 51 Lines • ▼ Show 20 Lines | if (nNet > 0 || wtx.IsCoinBase()) { | ||||
CTxDestination address; | CTxDestination address; | ||||
sub.idx = i; // vout index | sub.idx = i; // vout index | ||||
sub.credit = txout.nValue; | sub.credit = txout.nValue; | ||||
sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY; | sub.involvesWatchAddress = mine & ISMINE_WATCH_ONLY; | ||||
if (ExtractDestination(txout.scriptPubKey, address) && | if (ExtractDestination(txout.scriptPubKey, address) && | ||||
IsMine(*wallet, address)) { | IsMine(*wallet, address)) { | ||||
// Received by Bitcoin Address | // Received by Bitcoin Address | ||||
sub.type = TransactionRecord::RecvWithAddress; | sub.type = TransactionRecord::RecvWithAddress; | ||||
sub.address = CBitcoinAddress(address).ToString(); | sub.address = EncodeDestination(address); | ||||
} else { | } else { | ||||
// Received by IP connection (deprecated features), or a | // Received by IP connection (deprecated features), or a | ||||
// multisignature or other non-simple transaction | // multisignature or other non-simple transaction | ||||
sub.type = TransactionRecord::RecvFromOther; | sub.type = TransactionRecord::RecvFromOther; | ||||
sub.address = mapValue["from"]; | sub.address = mapValue["from"]; | ||||
} | } | ||||
if (wtx.IsCoinBase()) { | if (wtx.IsCoinBase()) { | ||||
// Generated | // Generated | ||||
▲ Show 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | if (nNet > 0 || wtx.IsCoinBase()) { | ||||
// from a transaction sent back to our own address. | // from a transaction sent back to our own address. | ||||
continue; | continue; | ||||
} | } | ||||
CTxDestination address; | CTxDestination address; | ||||
if (ExtractDestination(txout.scriptPubKey, address)) { | if (ExtractDestination(txout.scriptPubKey, address)) { | ||||
// Sent to Bitcoin Address | // Sent to Bitcoin Address | ||||
sub.type = TransactionRecord::SendToAddress; | sub.type = TransactionRecord::SendToAddress; | ||||
sub.address = CBitcoinAddress(address).ToString(); | sub.address = EncodeDestination(address); | ||||
} else { | } else { | ||||
// Sent to IP, or other non-address transaction like OP_EVAL | // Sent to IP, or other non-address transaction like OP_EVAL | ||||
sub.type = TransactionRecord::SendToOther; | sub.type = TransactionRecord::SendToOther; | ||||
sub.address = mapValue["to"]; | sub.address = mapValue["to"]; | ||||
} | } | ||||
CAmount nValue = txout.nValue; | CAmount nValue = txout.nValue; | ||||
/* Add fee to first output */ | /* Add fee to first output */ | ||||
▲ Show 20 Lines • Show All 96 Lines • Show Last 20 Lines |