Skip to content

Commit

Permalink
Few small changes to transactionrecord/table model
Browse files Browse the repository at this point in the history
  • Loading branch information
Tranz5 committed May 19, 2014
1 parent a2ca7e1 commit 3fbf859
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/qt/transactiondesc.cpp
Expand Up @@ -14,7 +14,7 @@ QString TransactionDesc::FormatTxStatus(const CWalletTx& wtx)
if (!wtx.IsFinal())
{
if (wtx.nLockTime < LOCKTIME_THRESHOLD)
return tr("Open for %n block(s)", "", nBestHeight - wtx.nLockTime);
return tr("Open for %n more block(s)", "", wtx.nLockTime - nBestHeight + 1);
else
return tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx.nLockTime));
}
Expand Down Expand Up @@ -216,7 +216,7 @@ QString TransactionDesc::toHTML(CWallet *wallet, CWalletTx &wtx)
strHTML += "<b>" + tr("Transaction ID") + ":</b> " + wtx.GetHash().ToString().c_str() + "<br>";

if (wtx.IsCoinBase() || wtx.IsCoinStake())
strHTML += "<br>" + tr("Generated coins must mature 520 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";
strHTML += "<br>" + tr("Generated coins must mature 25 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to \"not accepted\" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.") + "<br>";

//
// Debug view
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactionrecord.cpp
Expand Up @@ -172,7 +172,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
if (wtx.nLockTime < LOCKTIME_THRESHOLD)
{
status.status = TransactionStatus::OpenUntilBlock;
status.open_for = nBestHeight - wtx.nLockTime;
status.open_for = wtx.nLockTime - nBestHeight + 1;
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactiontablemodel.cpp
Expand Up @@ -280,7 +280,7 @@ QString TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) cons
switch(wtx->status.status)
{
case TransactionStatus::OpenUntilBlock:
status = tr("Open for %n block(s)","",wtx->status.open_for);
status = tr("Open for %n more block(s)","",wtx->status.open_for);
break;
case TransactionStatus::OpenUntilDate:
status = tr("Open until %1").arg(GUIUtil::dateTimeStr(wtx->status.open_for));
Expand Down
2 changes: 1 addition & 1 deletion src/qt/transactiontablemodel.h
Expand Up @@ -81,5 +81,5 @@ public slots:
friend class TransactionTablePriv;
};

#endif
#endif // TRANSACTIONTABLEMODEL_H

0 comments on commit 3fbf859

Please sign in to comment.