libwallet_api: Added option to restore from specific height

This commit is contained in:
Jacob Brydolf
2016-10-08 00:57:09 +02:00
parent 9798bde11e
commit 36a89ab435
5 changed files with 20 additions and 3 deletions

View File

@@ -57,9 +57,12 @@ Wallet *WalletManagerImpl::openWallet(const std::string &path, const std::string
return wallet;
}
Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &memo, bool testnet)
Wallet *WalletManagerImpl::recoveryWallet(const std::string &path, const std::string &memo, bool testnet, uint64_t restoreHeight)
{
WalletImpl * wallet = new WalletImpl(testnet);
if(restoreHeight > 0){
wallet->setRefreshFromBlockHeight(restoreHeight);
}
wallet->recover(path, memo);
return wallet;
}