diff options
author | selsta <selsta@sent.at> | 2019-01-02 01:08:46 +0100 |
---|---|---|
committer | selsta <selsta@sent.at> | 2019-01-02 11:25:49 +0100 |
commit | 13785ec96b7148e03c4b4e19fbf0c95847cbacb0 (patch) | |
tree | f94dbbf409d7ee8ee50b431c3152c1ff7b12a28a /src/wallet/api/wallet_manager.cpp | |
parent | Merge pull request #4960 (diff) | |
download | monero-13785ec96b7148e03c4b4e19fbf0c95847cbacb0.tar.xz |
wallet api/device: set estimated restore height if none is provided
Diffstat (limited to 'src/wallet/api/wallet_manager.cpp')
-rw-r--r-- | src/wallet/api/wallet_manager.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/api/wallet_manager.cpp b/src/wallet/api/wallet_manager.cpp index 5b262f1b7..89fe01c0d 100644 --- a/src/wallet/api/wallet_manager.cpp +++ b/src/wallet/api/wallet_manager.cpp @@ -127,6 +127,8 @@ Wallet *WalletManagerImpl::createWalletFromDevice(const std::string &path, WalletImpl * wallet = new WalletImpl(nettype, kdf_rounds); if(restoreHeight > 0){ wallet->setRefreshFromBlockHeight(restoreHeight); + } else { + wallet->setRefreshFromBlockHeight(wallet->estimateBlockChainHeight()); } auto lookahead = tools::parse_subaddress_lookahead(subaddressLookahead); if (lookahead) |