Litecoin: Fee calculation: round up bytes to the nearest 1000

This commit is contained in:
Warren Togami 2015-01-30 17:07:09 -10:00
parent 9b62fe55c0
commit a341cab93b

View File

@ -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)