mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-23 22:46:56 +01:00
Updated WalletAppKit to allow autosave configuration override
This commit is contained in:
parent
fae82e0f2b
commit
1878f5b9fc
1 changed files with 7 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue