From 3e112485bacab9db4e37a17ac7f9550f420582a9 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 8 Apr 2024 07:52:02 -0400 Subject: [PATCH] warn if trade wallet is more than 10 blocks behind monerod --- core/src/main/java/haveno/core/trade/Trade.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index e499a922..777af892 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -2106,8 +2106,9 @@ public abstract class Trade implements Tradable, Model { // log warning if wallet is too far behind daemon MoneroDaemonInfo lastInfo = xmrConnectionService.getLastInfo(); long walletHeight = wallet.getHeight(); - if (wasWalletSynced && isDepositsPublished() && !isIdling() && lastInfo != null && walletHeight < lastInfo.getHeight() - 3 && !Config.baseCurrencyNetwork().isTestnet()) { - log.warn("Wallet is more than 3 blocks behind monerod for {} {}, wallet height={}, monerod height={},", getClass().getSimpleName(), getShortId(), walletHeight, lastInfo.getHeight()); + int maxBlocksBehindWarning = 10; + if (wasWalletSynced && isDepositsPublished() && !isIdling() && lastInfo != null && walletHeight < lastInfo.getHeight() - maxBlocksBehindWarning && !Config.baseCurrencyNetwork().isTestnet()) { + log.warn("Wallet is more than {} blocks behind monerod for {} {}, wallet height={}, monerod height={},", maxBlocksBehindWarning, getClass().getSimpleName(), getShortId(), walletHeight, lastInfo.getHeight()); } // skip if either deposit tx id is unknown