mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
Litecoin: improve dust spamming prevention algorithm to add base fee for each output that's less than a CENT
This commit is contained in:
parent
5e17fcb020
commit
db4d8e21d9
12
src/main.cpp
12
src/main.cpp
@ -616,13 +616,11 @@ int64 CTransaction::GetMinFee(unsigned int nBlockSize, bool fAllowFree,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// To limit dust spam, require base fee if any output is less than 0.01
|
// Litecoin
|
||||||
if (nMinFee < nBaseFee)
|
// To limit dust spam, add nBaseFee for each output less than 0.01
|
||||||
{
|
BOOST_FOREACH(const CTxOut& txout, vout)
|
||||||
BOOST_FOREACH(const CTxOut& txout, vout)
|
if (txout.nValue < 0.01)
|
||||||
if (txout.nValue < CENT)
|
nMinFee += nBaseFee;
|
||||||
nMinFee = nBaseFee;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Raise the price as the block approaches full
|
// Raise the price as the block approaches full
|
||||||
if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
|
if (nBlockSize != 1 && nNewBlockSize >= MAX_BLOCK_SIZE_GEN/2)
|
||||||
|
Loading…
Reference in New Issue
Block a user