0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

scripted-diff: rename nDepth -> depth

-BEGIN VERIFY SCRIPT-
s() { sed -i -e 's/nDepth/depth/g' $(git grep -l 'nDepth' $1); }
s src/qt/transactiondesc.cpp
-END VERIFY SCRIPT-
This commit is contained in:
w0xlt 2022-02-21 15:17:24 -03:00
parent b1bc1431db
commit 045f8d0310

View file

@ -34,16 +34,16 @@ using wallet::isminetype;
QString TransactionDesc::FormatTxStatus(const interfaces::WalletTx& wtx, const interfaces::WalletTxStatus& status, bool inMempool, int numBlocks)
{
int nDepth = status.depth_in_main_chain;
if (nDepth < 0) {
return tr("conflicted with a transaction with %1 confirmations").arg(-nDepth);
} else if (nDepth == 0) {
int depth = status.depth_in_main_chain;
if (depth < 0) {
return tr("conflicted with a transaction with %1 confirmations").arg(-depth);
} else if (depth == 0) {
const QString abandoned{status.is_abandoned ? QLatin1String(", ") + tr("abandoned") : QString()};
return tr("0/unconfirmed, %1").arg(inMempool ? tr("in memory pool") : tr("not in memory pool")) + abandoned;
} else if (nDepth < 6) {
return tr("%1/unconfirmed").arg(nDepth);
} else if (depth < 6) {
return tr("%1/unconfirmed").arg(depth);
} else {
return tr("%1 confirmations").arg(nDepth);
return tr("%1 confirmations").arg(depth);
}
}