Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactionrecord.cpp
Show First 20 Lines • Show All 170 Lines • ▼ Show 20 Lines | 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); | ||||
status.depth = wtx.GetDepthInMainChain(); | status.depth = wtx.GetDepthInMainChain(); | ||||
status.cur_num_blocks = chainActive.Height(); | status.cur_num_blocks = chainActive.Height(); | ||||
if (!CheckFinalTx(wtx)) { | if (!CheckFinalTx(*wtx.tx)) { | ||||
if (wtx.tx->nLockTime < LOCKTIME_THRESHOLD) { | if (wtx.tx->nLockTime < LOCKTIME_THRESHOLD) { | ||||
status.status = TransactionStatus::OpenUntilBlock; | status.status = TransactionStatus::OpenUntilBlock; | ||||
status.open_for = wtx.tx->nLockTime - chainActive.Height(); | status.open_for = wtx.tx->nLockTime - chainActive.Height(); | ||||
} else { | } else { | ||||
status.status = TransactionStatus::OpenUntilDate; | status.status = TransactionStatus::OpenUntilDate; | ||||
status.open_for = wtx.tx->nLockTime; | status.open_for = wtx.tx->nLockTime; | ||||
} | } | ||||
} else if (type == TransactionRecord::Generated) { | } else if (type == TransactionRecord::Generated) { | ||||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |