diff options
author | Howard Chu <hyc@symas.com> | 2016-04-15 16:30:06 +0100 |
---|---|---|
committer | Howard Chu <hyc@symas.com> | 2016-04-17 15:25:46 +0100 |
commit | b6e42c3276994f25dbe271d68092fb97ee1c7424 (patch) | |
tree | e4af26deff88c588e61593d79f0098b781f954d8 /src | |
parent | Add GET_HASHES_FAST rpc, use it in wallet (diff) | |
download | monero-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.cpp | 6 |
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; |