Updated WalletAppKit to allow autosave configuration override

This commit is contained in:
Justas Dobiliauskas 2016-03-18 13:30:45 +02:00 committed by Andreas Schildbach
parent fae82e0f2b
commit 1878f5b9fc

View file

@ -376,11 +376,17 @@ public class WalletAppKit extends AbstractIdleService {
wallet = loadWallet(false);
}
if (useAutoSave) wallet.autosaveToFile(vWalletFile, 5, TimeUnit.SECONDS, null);
if (useAutoSave) {
this.setupAutoSave(wallet);
}
return wallet;
}
protected void setupAutoSave(Wallet wallet) {
wallet.autosaveToFile(vWalletFile, 5, TimeUnit.SECONDS, null);
}
private Wallet loadWallet(boolean shouldReplayWallet) throws Exception {
Wallet wallet;
FileInputStream walletStream = new FileInputStream(vWalletFile);