static int column_alignments[] = {
Qt::AlignLeft|Qt::AlignVCenter,
Qt::AlignLeft|Qt::AlignVCenter,
- Qt::AlignRight|Qt::AlignVCenter,
- Qt::AlignRight|Qt::AlignVCenter,
- Qt::AlignRight|Qt::AlignVCenter,
- Qt::AlignRight|Qt::AlignVCenter
+ Qt::AlignLeft|Qt::AlignVCenter,
+ Qt::AlignLeft|Qt::AlignVCenter,
+ Qt::AlignLeft|Qt::AlignVCenter,
+ Qt::AlignLeft|Qt::AlignVCenter,
+ Qt::AlignLeft|Qt::AlignVCenter
};
struct TxLessThan
mintingInterval(10),
priv(new MintingTablePriv(wallet, this))
{
- columns << tr("Transaction") << tr("Address") << tr("Age") << tr("Balance") << tr("CoinDay") << tr("MintProbability");
+ columns << tr("Transaction") << tr("Address") << tr("Age") << tr("Balance") << tr("CoinDay") << tr("MintProbability") << tr("MintReward");
priv->refreshWallet();
QTimer *timer = new QTimer(this);
return formatTxCoinDay(rec);
case MintProbability:
return formatDayToMint(rec);
+ case MintReward:
+ return formatTxPoSReward(rec);
}
break;
case Qt::TextAlignmentRole:
return rec->nValue;
case MintProbability:
return getDayToMint(rec);
+ case MintReward:
+ return formatTxPoSReward(rec);
}
break;
case Qt::BackgroundColorRole:
return description;
}
+QString MintingTableModel::formatTxPoSReward(KernelRecord *wtx) const
+{
+ QString posReward;
+ int nBits = GetLastBlockIndex(pindexBest, true)->nBits;
+ posReward += QString(QObject::tr("from %1 to %2")).arg(BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), wtx->getPoSReward(nBits, 0)),
+ BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), wtx->getPoSReward(nBits, mintingInterval)));
+ return posReward;
+}
+
double MintingTableModel::getDayToMint(KernelRecord *wtx) const
{
const CBlockIndex *p = GetLastBlockIndex(pindexBest, true);
QString MintingTableModel::formatTxBalance(const KernelRecord *wtx) const
{
- return BitcoinUnits::format(walletModel->getOptionsModel()->getDisplayUnit(), wtx->nValue);
+ return BitcoinUnits::formatWithUnit(walletModel->getOptionsModel()->getDisplayUnit(), wtx->nValue);
}
QVariant MintingTableModel::headerData(int section, Qt::Orientation orientation, int role) const
return tr("Coin age in the output.");
case MintProbability:
return tr("Chance to mint a block within given time interval.");
+ case MintReward:
+ return tr("The size of the potential rewards if the block is found at the beginning and the end given time interval.");
}
}
}
return QModelIndex();
}
}
-