From 13785ec96b7148e03c4b4e19fbf0c95847cbacb0 Mon Sep 17 00:00:00 2001 From: selsta Date: Wed, 2 Jan 2019 01:08:46 +0100 Subject: wallet api/device: set estimated restore height if none is provided --- src/wallet/api/wallet_manager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/wallet/api/wallet_manager.cpp') 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) -- cgit v1.2.3