aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet2.cpp
diff options
context:
space:
mode:
authorstoffu <stoffu@protonmail.ch>2018-06-04 19:18:18 +0900
committerstoffu <stoffu@protonmail.ch>2018-06-21 12:35:23 +0900
commit8fc0cdb96f136fbce59503789d17c6be30fe219a (patch)
treed43dfba7a5927cd1318d187b3b8182709084ba62 /src/wallet/wallet2.cpp
parentMerge pull request #3784 (diff)
downloadmonero-8fc0cdb96f136fbce59503789d17c6be30fe219a.tar.xz
wallet2: lower default for subaddress lookahead when restoring with hardware
Diffstat (limited to '')
-rw-r--r--src/wallet/wallet2.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index bb0953689..16ca04e3f 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -3273,6 +3273,12 @@ void wallet2::restore(const std::string& wallet_, const epee::wipeable_string& p
cryptonote::block b;
generate_genesis(b);
m_blockchain.push_back(get_block_hash(b));
+ if (m_subaddress_lookahead_major == SUBADDRESS_LOOKAHEAD_MAJOR && m_subaddress_lookahead_minor == SUBADDRESS_LOOKAHEAD_MINOR)
+ {
+ // the default lookahead setting (50:200) is clearly too much for hardware wallet
+ m_subaddress_lookahead_major = 5;
+ m_subaddress_lookahead_minor = 20;
+ }
add_subaddress_account(tr("Primary account"));
if (!wallet_.empty()) {
store();