aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-10-03 11:49:46 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-10-03 11:49:46 +0100
commitf139a6cad068992edcb688ba34aafe15e416bf62 (patch)
tree91ac4d618b4e31bf299213930fdf0588b088c38f /src/wallet/wallet2.cpp
parentMerge pull request #2518 (diff)
downloadmonero-f139a6cad068992edcb688ba34aafe15e416bf62.tar.xz
wallet2: fix backlog being off by 1
We don't want to count "partly filled" blocks in this case
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 08e1d2a09..16c3529db 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -6018,8 +6018,8 @@ std::vector<std::pair<uint64_t, uint64_t>> wallet2::estimate_backlog(uint64_t mi
priority_size_max += i.blob_size;
}
- uint64_t nblocks_min = (priority_size_min + full_reward_zone - 1) / full_reward_zone;
- uint64_t nblocks_max = (priority_size_max + full_reward_zone - 1) / full_reward_zone;
+ uint64_t nblocks_min = priority_size_min / full_reward_zone;
+ uint64_t nblocks_max = priority_size_max / full_reward_zone;
MDEBUG("estimate_backlog: priority_size " << priority_size_min << " - " << priority_size_max << " for " << fee
<< " (" << our_fee_byte_min << " - " << our_fee_byte_max << " piconero byte fee), "
<< nblocks_min << " - " << nblocks_max << " blocks at block size " << full_reward_zone);