mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-12-02 03:53:14 +00:00
blockchain: remove minor floating point usage
This commit is contained in:
parent
a529f0a6c9
commit
deeffaeb5c
1 changed files with 1 additions and 1 deletions
|
@ -2933,7 +2933,7 @@ bool Blockchain::check_fee(size_t blob_size, uint64_t fee) const
|
||||||
needed_fee += (blob_size % 1024) ? 1 : 0;
|
needed_fee += (blob_size % 1024) ? 1 : 0;
|
||||||
needed_fee *= fee_per_kb;
|
needed_fee *= fee_per_kb;
|
||||||
|
|
||||||
if (fee < needed_fee * 0.98) // keep a little buffer on acceptance
|
if (fee < needed_fee - needed_fee / 50) // keep a little 2% buffer on acceptance - no integer overflow
|
||||||
{
|
{
|
||||||
MERROR_VER("transaction fee is not enough: " << print_money(fee) << ", minimum fee: " << print_money(needed_fee));
|
MERROR_VER("transaction fee is not enough: " << print_money(fee) << ", minimum fee: " << print_money(needed_fee));
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue