Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | TransactionRecord::decomposeTransaction(const CWallet *wallet, | ||||
return parts; | return parts; | ||||
} | } | ||||
void TransactionRecord::updateStatus(const CWalletTx &wtx) { | void TransactionRecord::updateStatus(const CWalletTx &wtx) { | ||||
AssertLockHeld(cs_main); | AssertLockHeld(cs_main); | ||||
// Determine transaction status | // Determine transaction status | ||||
// Find the block the tx is in | // Find the block the tx is in | ||||
CBlockIndex *pindex = nullptr; | const CBlockIndex *pindex = LookupBlockIndex(wtx.hashBlock); | ||||
BlockMap::iterator mi = mapBlockIndex.find(wtx.hashBlock); | |||||
if (mi != mapBlockIndex.end()) { | |||||
pindex = (*mi).second; | |||||
} | |||||
// Sort order, unrecorded transactions sort to the top | // Sort order, unrecorded transactions sort to the top | ||||
status.sortKey = | status.sortKey = | ||||
strprintf("%010d-%01d-%010u-%03d", | strprintf("%010d-%01d-%010u-%03d", | ||||
(pindex ? pindex->nHeight : std::numeric_limits<int>::max()), | (pindex ? pindex->nHeight : std::numeric_limits<int>::max()), | ||||
(wtx.IsCoinBase() ? 1 : 0), wtx.nTimeReceived, idx); | (wtx.IsCoinBase() ? 1 : 0), wtx.nTimeReceived, idx); | ||||
status.countsForBalance = | status.countsForBalance = | ||||
wtx.IsTrusted() && !(wtx.GetBlocksToMaturity() > 0); | wtx.IsTrusted() && !(wtx.GetBlocksToMaturity() > 0); | ||||
▲ Show 20 Lines • Show All 61 Lines • Show Last 20 Lines |