aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/blockchain.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2018-01-25 16:38:32 -0800
committerRiccardo Spagni <ric@spagni.net>2018-01-25 16:38:32 -0800
commit9872620781e3887e13a2cf57b577ae2c40b21947 (patch)
tree685db517148b7e97b203b7cc9229b7dd5c11155e /src/cryptonote_core/blockchain.cpp
parentMerge pull request #3013 (diff)
parentblockchain: remove minor floating point usage (diff)
downloadmonero-9872620781e3887e13a2cf57b577ae2c40b21947.tar.xz
Merge pull request #3014
deeffaeb blockchain: remove minor floating point usage (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.cpp')
-rw-r--r--src/cryptonote_core/blockchain.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp
index 4af987c3b..69288a2b7 100644
--- a/src/cryptonote_core/blockchain.cpp
+++ b/src/cryptonote_core/blockchain.cpp
@@ -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 *= 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));
return false;