mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
sync wallet on open
This commit is contained in:
parent
a5f457d8e9
commit
608c19a1d0
@ -445,7 +445,7 @@ public class XmrWalletService {
|
|||||||
if (sync) {
|
if (sync) {
|
||||||
log.info("Syncing wallet " + config.getPath() + " in background");
|
log.info("Syncing wallet " + config.getPath() + " in background");
|
||||||
walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs());
|
walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs());
|
||||||
log.info("Done starting background wallet sync for " + config.getPath());
|
log.info("Done starting background sync for wallet " + config.getPath());
|
||||||
} else {
|
} else {
|
||||||
walletRpc.setDaemonConnection(daemonConnection);
|
walletRpc.setDaemonConnection(daemonConnection);
|
||||||
}
|
}
|
||||||
@ -469,10 +469,17 @@ public class XmrWalletService {
|
|||||||
log.info("Opening wallet " + config.getPath());
|
log.info("Opening wallet " + config.getPath());
|
||||||
walletRpc.openWallet(config);
|
walletRpc.openWallet(config);
|
||||||
|
|
||||||
|
// sync wallet
|
||||||
|
log.info("Syncing wallet " + config.getPath());
|
||||||
|
walletRpc.sync();
|
||||||
|
log.info("Done syncing wallet " + config.getPath());
|
||||||
|
|
||||||
// start syncing wallet in background
|
// start syncing wallet in background
|
||||||
|
new Thread(() -> {
|
||||||
log.info("Syncing wallet " + config.getPath() + " in background");
|
log.info("Syncing wallet " + config.getPath() + " in background");
|
||||||
walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs());
|
walletRpc.startSyncing(connectionsService.getDefaultRefreshPeriodMs());
|
||||||
log.info("Done syncing wallet " + config.getPath());
|
log.info("Done starting background sync for wallet " + config.getPath());
|
||||||
|
}).start();
|
||||||
return walletRpc;
|
return walletRpc;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
Loading…
Reference in New Issue
Block a user