aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-05-27 22:06:30 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2011-05-27 22:06:30 +0200
commite923f8188ddd46f4565a3cffebb9fb260e3239bf (patch)
tree304f9c2c7f2f7ec90cb8bd789a05cedb8eeec59f
parent0eba00447e9e14415e1aa4834a03de0c5d221a1d (diff)
extend generation descriptions
-rw-r--r--gui/include/transactionrecord.h1
-rw-r--r--gui/src/transactionrecord.cpp1
-rw-r--r--gui/src/transactiontablemodel.cpp18
3 files changed, 16 insertions, 4 deletions
diff --git a/gui/include/transactionrecord.h b/gui/include/transactionrecord.h
index 47eed05d93..646f87c918 100644
--- a/gui/include/transactionrecord.h
+++ b/gui/include/transactionrecord.h
@@ -17,7 +17,6 @@ public:
{
Immature,
Mature,
- MaturesIn,
MaturesWarning, /* Will likely not mature because no nodes have confirmed */
NotAccepted
};
diff --git a/gui/src/transactionrecord.cpp b/gui/src/transactionrecord.cpp
index 8126cc763a..4024e25c59 100644
--- a/gui/src/transactionrecord.cpp
+++ b/gui/src/transactionrecord.cpp
@@ -106,7 +106,6 @@ QList<TransactionRecord> TransactionRecord::decomposeTransaction(const CWalletTx
if (wtx.IsInMainChain())
{
- sub.status.maturity = TransactionStatus::MaturesIn;
sub.status.matures_in = wtx.GetBlocksToMaturity();
// Check if the block was requested by anyone
diff --git a/gui/src/transactiontablemodel.cpp b/gui/src/transactiontablemodel.cpp
index 900cb6daa8..a5d8ffdaaa 100644
--- a/gui/src/transactiontablemodel.cpp
+++ b/gui/src/transactiontablemodel.cpp
@@ -184,8 +184,22 @@ QVariant TransactionTableModel::formatTxDescription(const TransactionRecord *wtx
description = tr("Payment to yourself");
break;
case TransactionRecord::Generated:
- /* TODO: more extensive description */
- description = tr("Generated");
+ switch(wtx->status.maturity)
+ {
+ case TransactionStatus::Immature:
+ description = tr("Generated (matures in %n more blocks)", "",
+ wtx->status.matures_in);
+ break;
+ case TransactionStatus::Mature:
+ description = tr("Generated");
+ break;
+ case TransactionStatus::MaturesWarning:
+ description = tr("Generated - Warning: This block was not received by any other nodes and will probably not be accepted!");
+ break;
+ case TransactionStatus::NotAccepted:
+ description = tr("Generated (not accepted)");
+ break;
+ }
break;
}
return QVariant(description);