diff --git a/src/qt/transactiondesc.cpp b/src/qt/transactiondesc.cpp index 948476205..15ffc336f 100644 --- a/src/qt/transactiondesc.cpp +++ b/src/qt/transactiondesc.cpp @@ -16,10 +16,10 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx) { - if (!wtx.IsFinal()) + if (!wtx.IsFinal(nBestHeight + 1)) { if (wtx.nLockTime < LOCKTIME_THRESHOLD) - return tr("Open for %n more block(s)", "", wtx.nLockTime - nBestHeight + 1); + return tr("Open for %n more block(s)", "", wtx.nLockTime - nBestHeight); else return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime)); } diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index c8d6fcbe6..0c29e5443 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -166,12 +166,12 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) status.depth = wtx.GetDepthInMainChain(); status.cur_num_blocks = nBestHeight; - if (!wtx.IsFinal()) + if (!wtx.IsFinal(nBestHeight + 1)) { if (wtx.nLockTime < LOCKTIME_THRESHOLD) { status.status = TransactionStatus::OpenUntilBlock; - status.open_for = wtx.nLockTime - nBestHeight + 1; + status.open_for = wtx.nLockTime - nBestHeight; } else {