From 036ddef52c3656587378e707a4dfd68fdaaaea96 Mon Sep 17 00:00:00 2001 From: woodser Date: Fri, 12 Jan 2024 07:51:43 -0500 Subject: [PATCH] update only buyer's payment sent message state property on startup --- core/src/main/java/haveno/core/trade/Trade.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/haveno/core/trade/Trade.java b/core/src/main/java/haveno/core/trade/Trade.java index bc49739444..680b568e71 100644 --- a/core/src/main/java/haveno/core/trade/Trade.java +++ b/core/src/main/java/haveno/core/trade/Trade.java @@ -694,11 +694,13 @@ public abstract class Trade implements Tradable, Model { xmrWalletService.addWalletListener(idlePayoutSyncer); } - // TODO: trader's payment sent message state property can become unsynced (after improper shut down?) - MessageState expectedState = getPaymentSentMessageState(); - if (!isArbitrator() && expectedState != null && expectedState != processModel.getPaymentSentMessageStateProperty().get()) { - log.warn("Updating unexpected payment sent message state for {} {}, expected={}, actual={}", getClass().getSimpleName(), getId(), expectedState, processModel.getPaymentSentMessageStateProperty().get()); - processModel.getPaymentSentMessageStateProperty().set(expectedState); + // TODO: buyer's payment sent message state property can become unsynced (after improper shut down?) + if (isBuyer()) { + MessageState expectedState = getPaymentSentMessageState(); + if (expectedState != null && expectedState != processModel.getPaymentSentMessageStateProperty().get()) { + log.warn("Updating unexpected payment sent message state for {} {}, expected={}, actual={}", getClass().getSimpleName(), getId(), expectedState, processModel.getPaymentSentMessageStateProperty().get()); + processModel.getPaymentSentMessageStateProperty().set(expectedState); + } } // trade is initialized