Move fee policy out of core
This commit is contained in:
@@ -406,7 +406,7 @@ QString CoinControlDialog::getPriorityLabel(const CTxMemPool& pool, double dPrio
|
||||
{
|
||||
// confirmations -> textual description
|
||||
typedef std::map<unsigned int, QString> PriorityDescription;
|
||||
static PriorityDescription priorityDescriptions = boost::assign::map_list_of
|
||||
const static PriorityDescription priorityDescriptions = boost::assign::map_list_of
|
||||
(1, tr("highest"))(2, tr("higher"))(3, tr("high"))
|
||||
(5, tr("medium-high"))(6, tr("medium"))
|
||||
(10, tr("low-medium"))(15, tr("low"))
|
||||
@@ -452,7 +452,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
{
|
||||
CTxOut txout(amount, (CScript)vector<unsigned char>(24, 0));
|
||||
txDummy.vout.push_back(txout);
|
||||
if (txout.IsDust(CTransaction::minRelayTxFee))
|
||||
if (txout.IsDust(::minRelayTxFee))
|
||||
fDust = true;
|
||||
}
|
||||
}
|
||||
@@ -544,7 +544,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
if (nChange > 0 && nChange < CENT)
|
||||
{
|
||||
CTxOut txout(nChange, (CScript)vector<unsigned char>(24, 0));
|
||||
if (txout.IsDust(CTransaction::minRelayTxFee))
|
||||
if (txout.IsDust(::minRelayTxFee))
|
||||
{
|
||||
nPayFee += nChange;
|
||||
nChange = 0;
|
||||
@@ -605,17 +605,17 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
|
||||
|
||||
// tool tips
|
||||
QString toolTip1 = tr("This label turns red, if the transaction size is greater than 1000 bytes.") + "<br /><br />";
|
||||
toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK())) + "<br /><br />";
|
||||
toolTip1 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK())) + "<br /><br />";
|
||||
toolTip1 += tr("Can vary +/- 1 byte per input.");
|
||||
|
||||
QString toolTip2 = tr("Transactions with higher priority are more likely to get included into a block.") + "<br /><br />";
|
||||
toolTip2 += tr("This label turns red, if the priority is smaller than \"medium\".") + "<br /><br />";
|
||||
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minTxFee.GetFeePerK()));
|
||||
toolTip2 += tr("This means a fee of at least %1 per kB is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CWallet::minTxFee.GetFeePerK()));
|
||||
|
||||
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::minRelayTxFee.GetFee(546)));
|
||||
QString toolTip3 = tr("This label turns red, if any recipient receives an amount smaller than %1.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, ::minRelayTxFee.GetFee(546)));
|
||||
|
||||
// how many satoshis the estimated fee can vary per byte we guess wrong
|
||||
double dFeeVary = (double)std::max(CTransaction::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
|
||||
double dFeeVary = (double)std::max(CWallet::minTxFee.GetFeePerK(), payTxFee.GetFeePerK()) / 1000;
|
||||
QString toolTip4 = tr("Can vary +/- %1 satoshi(s) per input.").arg(dFeeVary);
|
||||
|
||||
l3->setToolTip(toolTip4);
|
||||
|
||||
Reference in New Issue
Block a user