wallet api/device: set estimated restore height if none is provided

This commit is contained in:
selsta
2019-01-02 01:08:46 +01:00
parent 3c1c249922
commit 348320a3d4
4 changed files with 15 additions and 0 deletions
+2
View File
@@ -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)