3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-01-31 15:22:16 +00:00

Make wallets autosave every 200msec instead of every second. Also, save immediately upon creation of a fresh wallet in case the app doesn't sync to the network for some reason.

This commit is contained in:
Mike Hearn 2014-04-28 18:23:31 +02:00
parent ebc52aca7a
commit 31c8f8b494

View File

@ -226,8 +226,11 @@ public class WalletAppKit extends AbstractIdleService {
vWallet = new Wallet(params);
vWallet.addKey(new ECKey());
addWalletExtensions();
vWallet.saveToFile(vWalletFile);
}
if (useAutoSave) {
vWallet.autosaveToFile(vWalletFile, 200, TimeUnit.MILLISECONDS, null);
}
if (useAutoSave) vWallet.autosaveToFile(vWalletFile, 1, TimeUnit.SECONDS, null);
// Set up peer addresses or discovery first, so if wallet extensions try to broadcast a transaction
// before we're actually connected the broadcast waits for an appropriate number of connections.
if (peerAddresses != null) {