Browse Source

Litecoin: Reduce high priority tx size limit to 5KB (from 10KB)

This is the first step in making the high priority transaction area
available to more people.  Future versions of Litecoin will eventually
reduce this to 1KB per tx to match Bitcoin 0.8.6+.  We decline to
make that drastic of a reduction now as currently p2pool miners have
too much dust to combine.

Litecoin plays an active role in p2pool development to make this less
of a problem.  Litecoin helped p2pool version 13 to reduce the
frequency of dust payouts and increase the smallest dust size to be
roughly 5x bigger.  An upcoming version of p2pool is expected to
eliminate a lot more dust payouts.

Modified-from: 9612e4c0d9730dbdb9971e53c72df17dd97daa2a
0.8
Warren Togami 11 years ago
parent
commit
3d538f0a92
  1. 21
      src/main.cpp
  2. 6
      src/qt/coincontroldialog.cpp

21
src/main.cpp

@ -602,19 +602,14 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree, @@ -602,19 +602,14 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree,
if (fAllowFree)
{
if (nBlockSize == 1)
{
// Transactions under 10K are free
// (about 4500 BTC if made of 50 BTC inputs)
if (nBytes < 10000)
nMinFee = 0;
}
else
{
// Free transaction area
if (nNewBlockSize < DEFAULT_BLOCK_PRIORITY_SIZE)
nMinFee = 0;
}
// There is a free transaction area in blocks created by most miners,
// * If we are relaying we allow transactions up to DEFAULT_BLOCK_PRIORITY_SIZE - 1000
// to be considered to fall into this category. We don't want to encourage sending
// multiple transactions instead of one big transaction to avoid fees.
// * If we are creating a transaction we allow transactions up to 5,000 bytes
// to be considered safe and assume they can likely make it into this section.
if (nBytes < (mode == GMF_SEND ? 5000 : (DEFAULT_BLOCK_PRIORITY_SIZE - 1000)))
nMinFee = 0;
}
// Litecoin

6
src/qt/coincontroldialog.cpp

@ -506,7 +506,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) @@ -506,7 +506,7 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
// Min Fee
int64 nMinFee = CTransaction::nMinTxFee * (1 + (int64)nBytes / 1000) + CTransaction::nMinTxFee * nQuantityDust;
if (CTransaction::AllowFree(dPriority) && nBytes < 10000)
if (CTransaction::AllowFree(dPriority) && nBytes < 5000)
nMinFee = 0;
nPayFee = max(nFee, nMinFee);
@ -589,13 +589,13 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog) @@ -589,13 +589,13 @@ void CoinControlDialog::updateLabels(WalletModel *model, QDialog* dialog)
l8->setText(BitcoinUnits::formatWithUnit(nDisplayUnit, nChange)); // Change
// turn labels "red"
l5->setStyleSheet((nBytes >= 10000) ? "color:red;" : ""); // Bytes >= 10000
l5->setStyleSheet((nBytes >= 5000) ? "color:red;" : ""); // Bytes >= 5000
l6->setStyleSheet((!CTransaction::AllowFree(dPriority)) ? "color:red;" : ""); // Priority < "medium"
l7->setStyleSheet((fLowOutput) ? "color:red;" : ""); // Low Output = "yes"
l8->setStyleSheet((nChange > 0 && nChange < CENT) ? "color:red;" : ""); // Change < 0.01BTC
// tool tips
l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 10000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));
l5->setToolTip(tr("This label turns red, if the transaction size is bigger than 5000 bytes.\n\n This means a fee of at least %1 per kb is required.\n\n Can vary +/- 1 Byte per input.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));
l6->setToolTip(tr("Transactions with higher priority get more likely into a block.\n\nThis label turns red, if the priority is smaller than \"medium\".\n\n This means a fee of at least %1 per kb is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));
l7->setToolTip(tr("This label turns red, if any recipient receives an amount smaller than %1.\n\n This means a fee of at least %2 is required. \n\n Amounts below 0.546 times the minimum relay fee are shown as DUST.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));
l8->setToolTip(tr("This label turns red, if the change is smaller than %1.\n\n This means a fee of at least %2 is required.").arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CENT)).arg(BitcoinUnits::formatWithUnit(nDisplayUnit, CTransaction::nMinTxFee)));

Loading…
Cancel
Save