From 1a184a2e4f5c0a335f914eb3e7db423a96d6330c Mon Sep 17 00:00:00 2001 From: jmacxx <47253594+jmacxx@users.noreply.github.com> Date: Fri, 18 Aug 2023 17:51:54 -0500 Subject: [PATCH] Arbitration broadcast DPT and dispute message in parallel. Previously the dispute message would only be sent once the DPT had finished propagation. To a user it would appear as if nothing happened and they would attempt to initiate the process again. That would cause the DPT logic to fail (we already have an open timer etc..) and the logic failing would result in no happy path therefore no Dispute message being sent. Testing confirmed there is no requirement for the dispute to be chained on the successful propagation of the DPT to nodes. Both the DPT and the dispute can be attempted again by the user if necessary. Rebroadcasting an already published DPT causes no harm. Re-sending the dispute message also causes no harm as there is logic to detect if it already exists and handle it gracefully. --- .../portfolio/pendingtrades/PendingTradesDataModel.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java index 519dba1295d..5d869d3e98a 100644 --- a/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java +++ b/desktop/src/main/java/bisq/desktop/main/portfolio/pendingtrades/PendingTradesDataModel.java @@ -647,11 +647,10 @@ private void doOpenDispute(boolean isSupportTicket, Transaction depositTx) { dispute.setBurningManSelectionHeight(trade.getProcessModel().getBurningManSelectionHeight()); dispute.setTradeTxFee(trade.getTradeTxFeeAsLong()); - ((DisputeProtocol) tradeManager.getTradeProtocol(trade)).onPublishDelayedPayoutTx(() -> { - log.info("DelayedPayoutTx published and message sent to peer"); - sendOpenDisputeMessage(disputeManager, resultHandler, dispute); - }, + ((DisputeProtocol) tradeManager.getTradeProtocol(trade)).onPublishDelayedPayoutTx( + () -> log.info("DelayedPayoutTx published and message sent to peer"), errorMessage -> new Popup().error(errorMessage).show()); + sendOpenDisputeMessage(disputeManager, resultHandler, dispute); } else { log.warn("Invalid dispute state {}", disputeState.name()); }