aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-08-22 20:42:20 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-08-22 20:42:20 -0500
commit6e8e4fb3b72574f3ff4423abe12b0064c07cc930 (patch)
treeb11b7fe605157b78e1abd71743455fc16c8f01a9 /src
parentMerge pull request #4200 (diff)
parentwallet2: do not divide by 0 on invalid daemon response (diff)
downloadmonero-6e8e4fb3b72574f3ff4423abe12b0064c07cc930.tar.xz
Merge pull request #4202
8439306 wallet2: do not divide by 0 on invalid daemon response (moneromooo-monero)
Diffstat (limited to 'src')
-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 115438351..a98b79e8d 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -11211,6 +11211,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)