aboutsummaryrefslogtreecommitdiff
path: root/src/wallet
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-31 14:25:29 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-07-31 14:26:00 +0000
commit84393062120751921b54bea47e4b9b5b7b91910e (patch)
treee63ae4cfe5ddbbee6dec4dd8c21e0287b056db11 /src/wallet
parentMerge pull request #4129 (diff)
downloadmonero-84393062120751921b54bea47e4b9b5b7b91910e.tar.xz
wallet2: do not divide by 0 on invalid daemon response
Diffstat (limited to 'src/wallet')
-rw-r--r--src/wallet/wallet2.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 90807803a..663bcb215 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -10843,6 +10843,7 @@ std::vector<std::pair<uint64_t, uint64_t>> wallet2::estimate_backlog(const std::
const auto result = m_node_rpc_proxy.get_block_size_limit(block_size_limit);
throw_on_rpc_response_error(result, "get_info");
uint64_t full_reward_zone = block_size_limit / 2;
+ THROW_WALLET_EXCEPTION_IF(full_reward_zone == 0, error::wallet_internal_error, "Invalid block size limit from daemon");
std::vector<std::pair<uint64_t, uint64_t>> blocks;
for (const auto &fee_level: fee_levels)