mirror of
https://github.com/bitcoinj/bitcoinj.git
synced 2025-02-25 07:07:39 +01: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:
parent
ebc52aca7a
commit
31c8f8b494
1 changed files with 4 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue