aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHoward Chu <hyc@symas.com>2016-04-15 16:30:06 +0100
committerHoward Chu <hyc@symas.com>2016-04-17 15:25:46 +0100
commitb6e42c3276994f25dbe271d68092fb97ee1c7424 (patch)
treee4af26deff88c588e61593d79f0098b781f954d8 /src
parentAdd GET_HASHES_FAST rpc, use it in wallet (diff)
downloadmonero-b6e42c3276994f25dbe271d68092fb97ee1c7424.tar.xz
Speed up new wallet refresh
Use the current blockchain height as the refresh_from_block_height.
Diffstat (limited to 'src')
-rw-r--r--src/simplewallet/simplewallet.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/simplewallet/simplewallet.cpp b/src/simplewallet/simplewallet.cpp
index 29c92e049..46a8095fc 100644
--- a/src/simplewallet/simplewallet.cpp
+++ b/src/simplewallet/simplewallet.cpp
@@ -1410,6 +1410,12 @@ bool simple_wallet::new_wallet(const std::string &wallet_file, const std::string
}
m_wallet->init(m_daemon_address);
+ // for a totally new account, we don't care about older blocks.
+ if (!m_restore_deterministic_wallet)
+ {
+ std::string err;
+ m_wallet->set_refresh_from_block_height(get_daemon_blockchain_height(err));
+ }
// convert rng value to electrum-style word list
std::string electrum_words;