Browse Source

number of confirmations is no longer magic value

0.8
Wladimir J. van der Laan 14 years ago
parent
commit
18b99e3f69
  1. 2
      src/qt/transactionrecord.cpp
  2. 3
      src/qt/transactionrecord.h
  3. 2
      src/qt/transactiontablemodel.cpp

2
src/qt/transactionrecord.cpp

@ -211,7 +211,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) @@ -211,7 +211,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
{
status.status = TransactionStatus::Offline;
}
else if (status.depth < 6)
else if (status.depth < NumConfirmations)
{
status.status = TransactionStatus::Unconfirmed;
}

3
src/qt/transactionrecord.h

@ -59,6 +59,9 @@ public: @@ -59,6 +59,9 @@ public:
SendToSelf
};
/* Number of confirmation needed for transaction */
static const int NumConfirmations = 6;
TransactionRecord():
hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
{

2
src/qt/transactiontablemodel.cpp

@ -276,7 +276,7 @@ QVariant TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) con @@ -276,7 +276,7 @@ QVariant TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) con
status = tr("Offline (%1)").arg(wtx->status.depth);
break;
case TransactionStatus::Unconfirmed:
status = tr("Unconfirmed (%1)").arg(wtx->status.depth);
status = tr("Unconfirmed (%1/%2)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
break;
case TransactionStatus::HaveConfirmations:
status = tr("Confirmed (%1)").arg(wtx->status.depth);

Loading…
Cancel
Save