From 96221317e2f474d53dddd946649b020be0ed2668 Mon Sep 17 00:00:00 2001 From: chimp1984 Date: Tue, 22 Sep 2020 19:01:51 -0500 Subject: [PATCH] Change order of tasks Call BuyerSetupPayoutTxListener before BuyerSendCounterCurrencyTransferStartedMessage We will change BuyerSendCounterCurrencyTransferStartedMessage so that it does not complete until the message has been ACKed by the peer. It is more transparent to leave the task uncompleted and if it is the last task we dont have issues. The caller would not get the result handler called though until all is completed. But the result handler in the UI was anyway empty. --- .../java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java | 4 ++-- .../java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java index 93b449fad2..a0001a397b 100644 --- a/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/BuyerAsMakerProtocol.java @@ -234,8 +234,8 @@ public class BuyerAsMakerProtocol extends TradeProtocol implements BuyerProtocol MakerVerifyTakerAccount.class, MakerVerifyTakerFeePayment.class, BuyerSignPayoutTx.class, - BuyerSendCounterCurrencyTransferStartedMessage.class, - BuyerSetupPayoutTxListener.class + BuyerSetupPayoutTxListener.class, + BuyerSendCounterCurrencyTransferStartedMessage.class ); taskRunner.run(); } else { diff --git a/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java b/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java index 0a98b4dda7..549a8add70 100644 --- a/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java +++ b/core/src/main/java/bisq/core/trade/protocol/BuyerAsTakerProtocol.java @@ -198,7 +198,6 @@ public class BuyerAsTakerProtocol extends TradeProtocol implements BuyerProtocol taskRunner.run(); } - // The DepositTxAndDelayedPayoutTxMessage is a mailbox message as earlier we use only the deposit tx which can // be also received from the network once published. // Now we send the delayed payout tx as well and with that this message is mandatory for continuing the protocol. @@ -263,8 +262,8 @@ public class BuyerAsTakerProtocol extends TradeProtocol implements BuyerProtocol TakerVerifyMakerAccount.class, TakerVerifyMakerFeePayment.class, BuyerSignPayoutTx.class, - BuyerSendCounterCurrencyTransferStartedMessage.class, - BuyerSetupPayoutTxListener.class + BuyerSetupPayoutTxListener.class, + BuyerSendCounterCurrencyTransferStartedMessage.class ); taskRunner.run(); } else {