Increase wallet autosave delay for wallet-tool and WalletAppKit. Since we have some recovery for out-of-sync wallets in place, we can afford to save less often.

This commit is contained in:
Andreas Schildbach 2015-03-10 18:13:10 +01:00
parent 9e4d25b2c2
commit 59b426afe0
2 changed files with 2 additions and 2 deletions

View file

@ -346,7 +346,7 @@ public class WalletAppKit extends AbstractIdleService {
wallet.saveToFile(vWalletFile);
}
if (useAutoSave) wallet.autosaveToFile(vWalletFile, 200, TimeUnit.MILLISECONDS, null);
if (useAutoSave) wallet.autosaveToFile(vWalletFile, 5, TimeUnit.SECONDS, null);
return wallet;
}

View file

@ -826,7 +826,7 @@ public class WalletTool {
chain = new FullPrunedBlockChain(params, wallet, s);
}
// This will ensure the wallet is saved when it changes.
wallet.autosaveToFile(walletFile, 200, TimeUnit.MILLISECONDS, null);
wallet.autosaveToFile(walletFile, 5, TimeUnit.SECONDS, null);
if (options.has("tor")) {
try {
peers = PeerGroup.newWithTor(params, chain, new TorClient());