Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show All 31 Lines | |||||
QList<TransactionRecord> | QList<TransactionRecord> | ||||
TransactionRecord::decomposeTransaction(const CWallet *wallet, | TransactionRecord::decomposeTransaction(const CWallet *wallet, | ||||
const CWalletTx &wtx) { | const CWalletTx &wtx) { | ||||
QList<TransactionRecord> parts; | QList<TransactionRecord> parts; | ||||
int64_t nTime = wtx.GetTxTime(); | int64_t nTime = wtx.GetTxTime(); | ||||
CAmount nCredit = wtx.GetCredit(ISMINE_ALL); | CAmount nCredit = wtx.GetCredit(ISMINE_ALL); | ||||
CAmount nDebit = wtx.GetDebit(ISMINE_ALL); | CAmount nDebit = wtx.GetDebit(ISMINE_ALL); | ||||
CAmount nNet = nCredit - nDebit; | CAmount nNet = nCredit - nDebit; | ||||
uint256 hash = wtx.GetId(); | txhash_t hash = wtx.GetHash(); | ||||
std::map<std::string, std::string> mapValue = wtx.mapValue; | std::map<std::string, std::string> mapValue = wtx.mapValue; | ||||
if (nNet > 0 || wtx.IsCoinBase()) { | if (nNet > 0 || wtx.IsCoinBase()) { | ||||
// | // | ||||
// Credit | // Credit | ||||
// | // | ||||
for (unsigned int i = 0; i < wtx.tx->vout.size(); i++) { | for (unsigned int i = 0; i < wtx.tx->vout.size(); i++) { | ||||
const CTxOut &txout = wtx.tx->vout[i]; | const CTxOut &txout = wtx.tx->vout[i]; | ||||
▲ Show 20 Lines • Show All 163 Lines • ▼ Show 20 Lines | void TransactionRecord::updateStatus(const CWalletTx &wtx) { | ||||
} | } | ||||
} | } | ||||
bool TransactionRecord::statusUpdateNeeded() { | bool TransactionRecord::statusUpdateNeeded() { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
return status.cur_num_blocks != chainActive.Height(); | return status.cur_num_blocks != chainActive.Height(); | ||||
} | } | ||||
QString TransactionRecord::getTxID() const { | QString TransactionRecord::getTxHash() const { | ||||
return QString::fromStdString(hash.ToString()); | return QString::fromStdString(hash.ToString()); | ||||
} | } | ||||
int TransactionRecord::getOutputIndex() const { | int TransactionRecord::getOutputIndex() const { | ||||
return idx; | return idx; | ||||
} | } |