aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp
diff options
context:
space:
mode:
authorselsta <selsta@sent.at>2019-01-02 01:08:46 +0100
committerselsta <selsta@sent.at>2019-01-02 11:25:49 +0100
commit13785ec96b7148e03c4b4e19fbf0c95847cbacb0 (patch)
treef94dbbf409d7ee8ee50b431c3152c1ff7b12a28a /src/wallet/api/wallet_manager.cpp
parentMerge pull request #4960 (diff)
downloadmonero-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.cpp2
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)