add logging and todo when monerod syncing behind tolerance

This commit is contained in:
woodser 2024-08-16 10:35:03 -04:00
parent ffe88b49a6
commit 8a3cf662a1

View file

@ -1767,9 +1767,12 @@ public class XmrWalletService extends XmrWalletBase {
return; return;
} }
if (!xmrConnectionService.isSyncedWithinTolerance()) { if (!xmrConnectionService.isSyncedWithinTolerance()) {
log.warn("Monero daemon is not synced within tolerance, height={}, targetHeight={}", xmrConnectionService.chainHeightProperty().get(), xmrConnectionService.getTargetHeight());
// TODO: this spams console every 5s when local node started and syncing
log.warn("Monero daemon is not synced within tolerance, height={}, targetHeight={}, monerod={}", xmrConnectionService.chainHeightProperty().get(), xmrConnectionService.getTargetHeight(), xmrConnectionService.getConnection() == null ? null : xmrConnectionService.getConnection().getUri());
return; return;
} }
// sync wallet if behind daemon // sync wallet if behind daemon
if (walletHeight.get() < xmrConnectionService.getTargetHeight()) { if (walletHeight.get() < xmrConnectionService.getTargetHeight()) {
synchronized (walletLock) { // avoid long sync from blocking other operations synchronized (walletLock) { // avoid long sync from blocking other operations