diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-20 21:31:06 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2011-06-20 21:34:31 +0200 |
commit | 18b99e3f69e039f8f431e49c3d1e6c9f96fe3896 (patch) | |
tree | 4d255971a25584865ce33809a9ffde3171c40820 | |
parent | 679592720af4bae337bcb2d2c0343a9352bbfefc (diff) |
number of confirmations is no longer magic value
-rw-r--r-- | src/qt/transactionrecord.cpp | 2 | ||||
-rw-r--r-- | src/qt/transactionrecord.h | 3 | ||||
-rw-r--r-- | src/qt/transactiontablemodel.cpp | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 34f30d53d5..2f00fa8752 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -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; } diff --git a/src/qt/transactionrecord.h b/src/qt/transactionrecord.h index c082fffe9c..a7f6537b3f 100644 --- a/src/qt/transactionrecord.h +++ b/src/qt/transactionrecord.h @@ -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) { diff --git a/src/qt/transactiontablemodel.cpp b/src/qt/transactiontablemodel.cpp index bed08d7802..e25ee1d1da 100644 --- a/src/qt/transactiontablemodel.cpp +++ b/src/qt/transactiontablemodel.cpp @@ -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); |