aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/api/wallet_manager.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2019-01-16 21:40:20 +0200
committerRiccardo Spagni <ric@spagni.net>2019-01-16 21:40:20 +0200
commitc84d559fb11af84bcca27cfb8328334cdbc318b8 (patch)
tree926164fda58c5607ab29983a051b536f2d856126 /src/wallet/api/wallet_manager.cpp
parentMerge pull request #5032 (diff)
parentwallet api/device: set estimated restore height if none is provided (diff)
downloadmonero-c84d559fb11af84bcca27cfb8328334cdbc318b8.tar.xz
Merge pull request #5034
13785ec9 wallet api/device: set estimated restore height if none is provided (selsta)
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)