mirror of
https://github.com/twisterarmy/twister-core.git
synced 2025-01-11 15:27:57 +00:00
number of confirmations is no longer magic value
This commit is contained in:
parent
679592720a
commit
18b99e3f69
@ -211,7 +211,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
|
|||||||
{
|
{
|
||||||
status.status = TransactionStatus::Offline;
|
status.status = TransactionStatus::Offline;
|
||||||
}
|
}
|
||||||
else if (status.depth < 6)
|
else if (status.depth < NumConfirmations)
|
||||||
{
|
{
|
||||||
status.status = TransactionStatus::Unconfirmed;
|
status.status = TransactionStatus::Unconfirmed;
|
||||||
}
|
}
|
||||||
|
@ -59,6 +59,9 @@ public:
|
|||||||
SendToSelf
|
SendToSelf
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* Number of confirmation needed for transaction */
|
||||||
|
static const int NumConfirmations = 6;
|
||||||
|
|
||||||
TransactionRecord():
|
TransactionRecord():
|
||||||
hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
|
hash(), time(0), type(Other), address(""), debit(0), credit(0), idx(0)
|
||||||
{
|
{
|
||||||
|
@ -276,7 +276,7 @@ QVariant TransactionTableModel::formatTxStatus(const TransactionRecord *wtx) con
|
|||||||
status = tr("Offline (%1)").arg(wtx->status.depth);
|
status = tr("Offline (%1)").arg(wtx->status.depth);
|
||||||
break;
|
break;
|
||||||
case TransactionStatus::Unconfirmed:
|
case TransactionStatus::Unconfirmed:
|
||||||
status = tr("Unconfirmed (%1)").arg(wtx->status.depth);
|
status = tr("Unconfirmed (%1/%2)").arg(wtx->status.depth).arg(TransactionRecord::NumConfirmations);
|
||||||
break;
|
break;
|
||||||
case TransactionStatus::HaveConfirmations:
|
case TransactionStatus::HaveConfirmations:
|
||||||
status = tr("Confirmed (%1)").arg(wtx->status.depth);
|
status = tr("Confirmed (%1)").arg(wtx->status.depth);
|
||||||
|
Loading…
Reference in New Issue
Block a user