sync wallet when opened

This commit is contained in:
woodser 2022-07-10 19:03:36 -04:00
parent 008210abf6
commit 8980a8ec60

View File

@ -466,10 +466,15 @@ public class XmrWalletService {
// open wallet // open wallet
try { try {
// open wallet
log.info("Opening wallet " + config.getPath()); log.info("Opening wallet " + config.getPath());
walletRpc.openWallet(config); walletRpc.openWallet(config);
log.info("Syncing wallet " + config.getPath());
// start syncing wallet in background
walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs()); walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs());
// sync wallet (blocks)
walletRpc.sync();
return walletRpc; return walletRpc;
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();