mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-11-17 00:07:49 +00:00
fetch txs on startup to fix balance with 0 conf PaymentReceivedMsg
This commit is contained in:
parent
013924b141
commit
cfaca6e0d8
1 changed files with 3 additions and 0 deletions
|
@ -682,6 +682,8 @@ public class XmrWalletService {
|
|||
// sync wallet and register listener
|
||||
if (wallet != null) {
|
||||
log.info("Monero wallet uri={}, path={}", wallet.getRpcConnection().getUri(), wallet.getPath());
|
||||
|
||||
// sync main wallet if applicable
|
||||
if (sync && numAttempts > 0) {
|
||||
try {
|
||||
|
||||
|
@ -692,6 +694,7 @@ public class XmrWalletService {
|
|||
wasWalletSynced = true;
|
||||
log.info("Done syncing main wallet in " + (System.currentTimeMillis() - time) + " ms");
|
||||
wallet.startSyncing(connectionsService.getRefreshPeriodMs());
|
||||
wallet.getTxs(new MoneroTxQuery().setIsLocked(true)); // TODO: main wallet's balance does update on startup with 0 conf PaymentReceivedMessage until pool txs fetched?
|
||||
if (getMoneroNetworkType() != MoneroNetworkType.MAINNET) log.info("Monero wallet balance={}, unlocked balance={}", wallet.getBalance(0), wallet.getUnlockedBalance(0));
|
||||
|
||||
// reapply connection after wallet synced
|
||||
|
|
Loading…
Reference in a new issue