Merge pull request #1615 from rnicoll/1.14/dust-fees
Correct dust and change
This commit is contained in:
commit
d5d4388a16
|
@ -181,8 +181,7 @@ CAmount GetDogecoinDustFee(const std::vector<CTxOut> &vout, CFeeRate &baseFeeRat
|
||||||
|
|
||||||
// To limit dust spam, add base fee for each output less than a COIN
|
// To limit dust spam, add base fee for each output less than a COIN
|
||||||
BOOST_FOREACH(const CTxOut& txout, vout)
|
BOOST_FOREACH(const CTxOut& txout, vout)
|
||||||
// if (txout.IsDust(::minRelayTxFee))
|
if (txout.IsDust(::minRelayTxFee))
|
||||||
if (txout.nValue < COIN)
|
|
||||||
nFee += baseFeeRate.GetFeePerK();
|
nFee += baseFeeRate.GetFeePerK();
|
||||||
|
|
||||||
return nFee;
|
return nFee;
|
||||||
|
|
|
@ -178,6 +178,7 @@ public:
|
||||||
if (scriptPubKey.IsUnspendable())
|
if (scriptPubKey.IsUnspendable())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/*
|
||||||
size_t nSize = GetSerializeSize(*this, SER_DISK, 0);
|
size_t nSize = GetSerializeSize(*this, SER_DISK, 0);
|
||||||
int witnessversion = 0;
|
int witnessversion = 0;
|
||||||
std::vector<unsigned char> witnessprogram;
|
std::vector<unsigned char> witnessprogram;
|
||||||
|
@ -191,6 +192,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
return 3 * minRelayTxFee.GetFee(nSize);
|
return 3 * minRelayTxFee.GetFee(nSize);
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Dogecoin: Anything below 1 DOGE is always dust
|
||||||
|
return COIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsDust(const CFeeRate &minRelayTxFee) const
|
bool IsDust(const CFeeRate &minRelayTxFee) const
|
||||||
|
|
|
@ -53,9 +53,9 @@ static const CAmount DEFAULT_TRANSACTION_MINFEE = COIN;
|
||||||
//! minimum recommended increment for BIP 125 replacement txs
|
//! minimum recommended increment for BIP 125 replacement txs
|
||||||
static const CAmount WALLET_INCREMENTAL_RELAY_FEE = COIN * 5;
|
static const CAmount WALLET_INCREMENTAL_RELAY_FEE = COIN * 5;
|
||||||
//! target minimum change amount
|
//! target minimum change amount
|
||||||
static const CAmount MIN_CHANGE = CENT;
|
static const CAmount MIN_CHANGE = COIN;
|
||||||
//! final minimum change amount after paying for fees
|
//! final minimum change amount after paying for fees
|
||||||
static const CAmount MIN_FINAL_CHANGE = MIN_CHANGE/2;
|
static const CAmount MIN_FINAL_CHANGE = COIN;
|
||||||
//! Default for -spendzeroconfchange
|
//! Default for -spendzeroconfchange
|
||||||
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
|
static const bool DEFAULT_SPEND_ZEROCONF_CHANGE = true;
|
||||||
//! Default for -sendfreetransactions
|
//! Default for -sendfreetransactions
|
||||||
|
|
Loading…
Reference in a new issue