Changeset View
Changeset View
Standalone View
Standalone View
src/qt/transactiondesc.cpp
Show All 33 Lines | if (!status.is_final) { | ||||
return tr("Open until %1") | return tr("Open until %1") | ||||
.arg(GUIUtil::dateTimeStr(wtx.tx->nLockTime)); | .arg(GUIUtil::dateTimeStr(wtx.tx->nLockTime)); | ||||
} | } | ||||
} else { | } else { | ||||
int nDepth = status.depth_in_main_chain; | int nDepth = status.depth_in_main_chain; | ||||
if (nDepth < 0) { | if (nDepth < 0) { | ||||
return tr("conflicted with a transaction with %1 confirmations") | return tr("conflicted with a transaction with %1 confirmations") | ||||
.arg(-nDepth); | .arg(-nDepth); | ||||
} else if (adjustedTime - status.time_received > 2 * 60 && | |||||
status.request_count == 0) { | |||||
return tr("%1/offline").arg(nDepth); | |||||
} else if (nDepth == 0) { | } else if (nDepth == 0) { | ||||
return tr("0/unconfirmed, %1") | return tr("0/unconfirmed, %1") | ||||
.arg((inMempool ? tr("in memory pool") | .arg((inMempool ? tr("in memory pool") | ||||
: tr("not in memory pool"))) + | : tr("not in memory pool"))) + | ||||
(status.is_abandoned ? ", " + tr("abandoned") : ""); | (status.is_abandoned ? ", " + tr("abandoned") : ""); | ||||
} else if (nDepth < 6) { | } else if (nDepth < 6) { | ||||
return tr("%1/unconfirmed").arg(nDepth); | return tr("%1/unconfirmed").arg(nDepth); | ||||
} else { | } else { | ||||
Show All 20 Lines | QString TransactionDesc::toHTML(interfaces::Node &node, | ||||
int64_t nTime = wtx.time; | int64_t nTime = wtx.time; | ||||
Amount nCredit = wtx.credit; | Amount nCredit = wtx.credit; | ||||
Amount nDebit = wtx.debit; | Amount nDebit = wtx.debit; | ||||
Amount nNet = nCredit - nDebit; | Amount nNet = nCredit - nDebit; | ||||
strHTML += "<b>" + tr("Status") + ":</b> " + | strHTML += "<b>" + tr("Status") + ":</b> " + | ||||
FormatTxStatus(wtx, status, inMempool, numBlocks, adjustedTime); | FormatTxStatus(wtx, status, inMempool, numBlocks, adjustedTime); | ||||
int nRequests = status.request_count; | |||||
if (nRequests != -1) { | |||||
if (nRequests == 0) { | |||||
strHTML += tr(", has not been successfully broadcast yet"); | |||||
} else if (nRequests > 0) { | |||||
strHTML += tr(", broadcast through %n node(s)", "", nRequests); | |||||
} | |||||
} | |||||
strHTML += "<br>"; | strHTML += "<br>"; | ||||
strHTML += "<b>" + tr("Date") + ":</b> " + | strHTML += "<b>" + tr("Date") + ":</b> " + | ||||
(nTime ? GUIUtil::dateTimeStr(nTime) : "") + "<br>"; | (nTime ? GUIUtil::dateTimeStr(nTime) : "") + "<br>"; | ||||
// | // | ||||
// From | // From | ||||
// | // | ||||
▲ Show 20 Lines • Show All 312 Lines • Show Last 20 Lines |