aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-12-27 12:22:42 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-01-10 11:05:30 +0000
commitdeeffaeb5cfe44cb8ab504472ea11d730922b09a (patch)
treee8bd3d5727af99dd48f9cb519b9ce5f451f7d595
parentMerge pull request #3019 (diff)
downloadmonero-deeffaeb5cfe44cb8ab504472ea11d730922b09a.tar.xz
blockchain: remove minor floating point usage
-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 709c5e852..aa9469ee0 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;