From 4103920a3114445c4e396f282183597fc22f15f7 Mon Sep 17 00:00:00 2001 From: Manfred Karrer Date: Sat, 25 Mar 2017 12:06:50 -0500 Subject: [PATCH] Remove taks for laod trade fee tx (use verify task for it) (WIP) --- .../trade/protocol/BuyerAsMakerProtocol.java | 7 ++- .../trade/protocol/BuyerAsTakerProtocol.java | 3 +- .../trade/protocol/SellerAsMakerProtocol.java | 1 - .../trade/protocol/SellerAsTakerProtocol.java | 1 - .../tasks/maker/MakerLoadTakeOfferFeeTx.java | 45 ------------------ .../tasks/taker/TakerLoadMakerFeeTx.java | 46 ------------------- 6 files changed, 5 insertions(+), 98 deletions(-) delete mode 100644 core/src/main/java/io/bisq/core/trade/protocol/tasks/maker/MakerLoadTakeOfferFeeTx.java delete mode 100644 core/src/main/java/io/bisq/core/trade/protocol/tasks/taker/TakerLoadMakerFeeTx.java diff --git a/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsMakerProtocol.java b/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsMakerProtocol.java index bf32bc74de..f4e2e4dfc7 100644 --- a/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsMakerProtocol.java +++ b/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsMakerProtocol.java @@ -123,9 +123,8 @@ public class BuyerAsMakerProtocol extends TradeProtocol implements BuyerProtocol taskRunner.addTasks( MakerProcessPayDepositRequest.class, MakerVerifyArbitrationSelection.class, - MakerVerifyTakerFeePayment.class, MakerVerifyTakerAccount.class, - MakerLoadTakeOfferFeeTx.class, + MakerVerifyTakerFeePayment.class, MakerCreateAndSignContract.class, BuyerAsMakerCreatesAndSignsDepositTx.class, MakerSetupDepositBalanceListener.class, @@ -149,8 +148,8 @@ public class BuyerAsMakerProtocol extends TradeProtocol implements BuyerProtocol () -> handleTaskRunnerSuccess("handle DepositTxPublishedMessage"), this::handleTaskRunnerFault); taskRunner.addTasks(MakerProcessDepositTxPublishedMessage.class, - MakerVerifyTakerFeePayment.class, MakerVerifyTakerAccount.class, + MakerVerifyTakerFeePayment.class, MakerPublishTradeStatistics.class); taskRunner.run(); } @@ -180,8 +179,8 @@ public class BuyerAsMakerProtocol extends TradeProtocol implements BuyerProtocol handleTaskRunnerFault(errorMessage); }); taskRunner.addTasks( - MakerVerifyTakerFeePayment.class, MakerVerifyTakerAccount.class, + MakerVerifyTakerFeePayment.class, BuyerAsMakerSignPayoutTx.class, BuyerSendFiatTransferStartedMessage.class, BuyerSetupListenerForPayoutTx.class diff --git a/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsTakerProtocol.java b/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsTakerProtocol.java index 035b5087ce..cd745aa41a 100644 --- a/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/core/trade/protocol/BuyerAsTakerProtocol.java @@ -96,7 +96,8 @@ public class BuyerAsTakerProtocol extends TradeProtocol implements BuyerProtocol taskRunner.addTasks( TakerSelectArbitrator.class, - TakerLoadMakerFeeTx.class, + TakerVerifyMakerAccount.class, + TakerVerifyMakerFeePayment.class, TakerCreateTakerFeeTx.class, TakerBroadcastTakerFeeTx.class, BuyerAsTakerCreatesDepositTxInputs.class, diff --git a/core/src/main/java/io/bisq/core/trade/protocol/SellerAsMakerProtocol.java b/core/src/main/java/io/bisq/core/trade/protocol/SellerAsMakerProtocol.java index f2bd5aa249..e134d1f88c 100644 --- a/core/src/main/java/io/bisq/core/trade/protocol/SellerAsMakerProtocol.java +++ b/core/src/main/java/io/bisq/core/trade/protocol/SellerAsMakerProtocol.java @@ -109,7 +109,6 @@ public class SellerAsMakerProtocol extends TradeProtocol implements SellerProtoc MakerVerifyArbitrationSelection.class, MakerVerifyTakerAccount.class, MakerVerifyTakerFeePayment.class, - MakerLoadTakeOfferFeeTx.class, MakerCreateAndSignContract.class, SellerAsMakerCreatesAndSignsDepositTx.class, MakerSetupDepositBalanceListener.class, diff --git a/core/src/main/java/io/bisq/core/trade/protocol/SellerAsTakerProtocol.java b/core/src/main/java/io/bisq/core/trade/protocol/SellerAsTakerProtocol.java index b276e9e128..495efe71d4 100644 --- a/core/src/main/java/io/bisq/core/trade/protocol/SellerAsTakerProtocol.java +++ b/core/src/main/java/io/bisq/core/trade/protocol/SellerAsTakerProtocol.java @@ -101,7 +101,6 @@ public class SellerAsTakerProtocol extends TradeProtocol implements SellerProtoc TakerVerifyMakerAccount.class, TakerVerifyMakerFeePayment.class, TakerSelectArbitrator.class, - TakerLoadMakerFeeTx.class, TakerCreateTakerFeeTx.class, TakerBroadcastTakerFeeTx.class, SellerAsTakerCreatesDepositTxInputs.class, diff --git a/core/src/main/java/io/bisq/core/trade/protocol/tasks/maker/MakerLoadTakeOfferFeeTx.java b/core/src/main/java/io/bisq/core/trade/protocol/tasks/maker/MakerLoadTakeOfferFeeTx.java deleted file mode 100644 index dc2eb48abe..0000000000 --- a/core/src/main/java/io/bisq/core/trade/protocol/tasks/maker/MakerLoadTakeOfferFeeTx.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.core.trade.protocol.tasks.maker; - -import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.protocol.tasks.TradeTask; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class MakerLoadTakeOfferFeeTx extends TradeTask { - @SuppressWarnings({"WeakerAccess", "unused"}) - public MakerLoadTakeOfferFeeTx(TaskRunner taskHandler, Trade trade) { - super(taskHandler, trade); - } - - @Override - protected void run() { - try { - runInterceptHook(); - - // TODO impl. missing - //processModel.getWalletService().findTxInBlockChain(processModel.getTakeOfferFeeTxId()); - - complete(); - } catch (Throwable t) { - failed(t); - } - } -} \ No newline at end of file diff --git a/core/src/main/java/io/bisq/core/trade/protocol/tasks/taker/TakerLoadMakerFeeTx.java b/core/src/main/java/io/bisq/core/trade/protocol/tasks/taker/TakerLoadMakerFeeTx.java deleted file mode 100644 index adc365c1cf..0000000000 --- a/core/src/main/java/io/bisq/core/trade/protocol/tasks/taker/TakerLoadMakerFeeTx.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * This file is part of bisq. - * - * bisq is free software: you can redistribute it and/or modify it - * under the terms of the GNU Affero General Public License as published by - * the Free Software Foundation, either version 3 of the License, or (at - * your option) any later version. - * - * bisq is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public - * License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with bisq. If not, see . - */ - -package io.bisq.core.trade.protocol.tasks.taker; - -import io.bisq.common.taskrunner.TaskRunner; -import io.bisq.core.trade.Trade; -import io.bisq.core.trade.protocol.tasks.TradeTask; -import lombok.extern.slf4j.Slf4j; - -@Slf4j -public class TakerLoadMakerFeeTx extends TradeTask { - - @SuppressWarnings({"WeakerAccess", "unused"}) - public TakerLoadMakerFeeTx(TaskRunner taskHandler, Trade trade) { - super(taskHandler, trade); - } - - @Override - protected void run() { - try { - runInterceptHook(); - - // TODO impl. missing - ///processModel.getWalletService().findTxInBlockChain(trade.getOfferPayload().getOfferFeePaymentTxId()); - - complete(); - } catch (Throwable t) { - failed(t); - } - } -} \ No newline at end of file