aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2019-09-04 09:39:07 -0500
committerluigi1111 <luigi1111w@gmail.com>2019-09-04 09:39:07 -0500
commita567e884b2bd353dfc67992b11a5640cb0b676ef (patch)
tree135cf605a788a02d8e3e406248d5c214b5bbcbcf /src
parentMerge pull request #5819 (diff)
parentreject setting lookahead major or minor to 0 (diff)
downloadmonero-a567e884b2bd353dfc67992b11a5640cb0b676ef.tar.xz
Merge pull request #5822
839fc62 reject setting lookahead major or minor to 0 (moneromoo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index b89f10eeb..b99fc12e2 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -1525,7 +1525,9 @@ void wallet2::set_subaddress_label(const cryptonote::subaddress_index& index, co
//----------------------------------------------------------------------------------------------------
void wallet2::set_subaddress_lookahead(size_t major, size_t minor)
{
+ THROW_WALLET_EXCEPTION_IF(major == 0, error::wallet_internal_error, "Subaddress major lookahead may not be zero");
THROW_WALLET_EXCEPTION_IF(major > 0xffffffff, error::wallet_internal_error, "Subaddress major lookahead is too large");
+ THROW_WALLET_EXCEPTION_IF(minor == 0, error::wallet_internal_error, "Subaddress minor lookahead may not be zero");
THROW_WALLET_EXCEPTION_IF(minor > 0xffffffff, error::wallet_internal_error, "Subaddress minor lookahead is too large");
m_subaddress_lookahead_major = major;
m_subaddress_lookahead_minor = minor;