From 8174ba34d92ad8cf92aef5c5ab1f943e2791205d Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 28 Apr 2023 14:42:43 -0400 Subject: [PATCH] log monerod on task runner and wallet poll errors --- core/src/main/java/haveno/core/trade/Trade.java | 6 +----- .../main/java/haveno/core/trade/protocol/TradeProtocol.java | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index b48cc566..36097ca0 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -737,10 +737,6 @@ public abstract class Trade implements Tradable, Model { return MONERO_TRADE_WALLET_PREFIX + getId(); } - public MoneroRpcConnection getDaemonConnection() { - return wallet == null ? null : wallet.getDaemonConnection(); - } - public void checkDaemonConnection() { CoreMoneroConnectionsService connectionService = xmrWalletService.getConnectionsService(); connectionService.checkConnection(); @@ -1859,7 +1855,7 @@ public abstract class Trade implements Tradable, Model { } } catch (Exception e) { if (!isShutDown && getWallet() != null && isWalletConnected()) { - log.warn("Error polling trade wallet for {} {}: {}. Monerod={}", getClass().getSimpleName(), getId(), e.getMessage(), getDaemonConnection()); + log.warn("Error polling trade wallet for {} {}: {}. Monerod={}", getClass().getSimpleName(), getId(), e.getMessage(), getXmrWalletService().getConnectionsService().getConnection()); } } } diff --git a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java index fb004745..6e4ecf97 100644 --- a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java +++ b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java @@ -791,7 +791,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D } void handleTaskRunnerFault(NodeAddress ackReceiver, @Nullable TradeMessage message, String source, String errorMessage) { - log.error("Task runner failed with error {}. Triggered from {}. Monerod={}" , errorMessage, source, trade.getDaemonConnection()); + log.error("Task runner failed with error {}. Triggered from {}. Monerod={}" , errorMessage, source, trade.getXmrWalletService().getConnectionsService().getConnection()); if (message != null) { sendAckMessage(ackReceiver, message, false, errorMessage);