Litecoin: Fee calculation: round up bytes to the nearest 1000
This commit is contained in:
parent
9b62fe55c0
commit
a341cab93b
@ -17,6 +17,10 @@ CFeeRate::CFeeRate(const CAmount& nFeePaid, size_t nSize)
|
||||
|
||||
CAmount CFeeRate::GetFee(size_t nSize) const
|
||||
{
|
||||
// Round up nSize to the nearest 1000
|
||||
CAmount mod = nSize % 1000;
|
||||
if (mod > 0)
|
||||
nSize = nSize - mod + 1000;
|
||||
CAmount nFee = nSatoshisPerK*nSize / 1000;
|
||||
|
||||
if (nFee == 0 && nSatoshisPerK > 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user