normalize names of protocol tasks

This commit is contained in:
woodser 2022-09-19 20:07:33 -04:00
parent 0388f283a7
commit c21ebe6a9d
35 changed files with 134 additions and 134 deletions

View file

@ -20,9 +20,9 @@ package bisq.core.offer.placeoffer;
import bisq.core.locale.Res; import bisq.core.locale.Res;
import bisq.core.offer.messages.SignOfferResponse; import bisq.core.offer.messages.SignOfferResponse;
import bisq.core.offer.placeoffer.tasks.AddToOfferBook; import bisq.core.offer.placeoffer.tasks.AddToOfferBook;
import bisq.core.offer.placeoffer.tasks.MakerReservesOfferFunds; import bisq.core.offer.placeoffer.tasks.MakerReserveOfferFunds;
import bisq.core.offer.placeoffer.tasks.MakerSendsSignOfferRequest; import bisq.core.offer.placeoffer.tasks.MakerSendSignOfferRequest;
import bisq.core.offer.placeoffer.tasks.MakerProcessesSignOfferResponse; import bisq.core.offer.placeoffer.tasks.MakerProcessSignOfferResponse;
import bisq.core.offer.placeoffer.tasks.ValidateOffer; import bisq.core.offer.placeoffer.tasks.ValidateOffer;
import bisq.core.trade.handlers.TransactionResultHandler; import bisq.core.trade.handlers.TransactionResultHandler;
import bisq.core.trade.protocol.TradeProtocol; import bisq.core.trade.protocol.TradeProtocol;
@ -77,8 +77,8 @@ public class PlaceOfferProtocol {
); );
taskRunner.addTasks( taskRunner.addTasks(
ValidateOffer.class, ValidateOffer.class,
MakerReservesOfferFunds.class, MakerReserveOfferFunds.class,
MakerSendsSignOfferRequest.class MakerSendSignOfferRequest.class
); );
taskRunner.run(); taskRunner.run();
@ -123,7 +123,7 @@ public class PlaceOfferProtocol {
} }
); );
taskRunner.addTasks( taskRunner.addTasks(
MakerProcessesSignOfferResponse.class, MakerProcessSignOfferResponse.class,
AddToOfferBook.class AddToOfferBook.class
); );

View file

@ -27,8 +27,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import bisq.common.taskrunner.Task; import bisq.common.taskrunner.Task;
import bisq.common.taskrunner.TaskRunner; import bisq.common.taskrunner.TaskRunner;
public class MakerProcessesSignOfferResponse extends Task<PlaceOfferModel> { public class MakerProcessSignOfferResponse extends Task<PlaceOfferModel> {
public MakerProcessesSignOfferResponse(TaskRunner<PlaceOfferModel> taskHandler, PlaceOfferModel model) { public MakerProcessSignOfferResponse(TaskRunner<PlaceOfferModel> taskHandler, PlaceOfferModel model) {
super(taskHandler, model); super(taskHandler, model);
} }

View file

@ -29,9 +29,9 @@ import java.util.List;
import monero.daemon.model.MoneroOutput; import monero.daemon.model.MoneroOutput;
import monero.wallet.model.MoneroTxWallet; import monero.wallet.model.MoneroTxWallet;
public class MakerReservesOfferFunds extends Task<PlaceOfferModel> { public class MakerReserveOfferFunds extends Task<PlaceOfferModel> {
public MakerReservesOfferFunds(TaskRunner taskHandler, PlaceOfferModel model) { public MakerReserveOfferFunds(TaskRunner taskHandler, PlaceOfferModel model) {
super(taskHandler, model); super(taskHandler, model);
} }

View file

@ -42,13 +42,13 @@ import java.util.UUID;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
public class MakerSendsSignOfferRequest extends Task<PlaceOfferModel> { public class MakerSendSignOfferRequest extends Task<PlaceOfferModel> {
private static final Logger log = LoggerFactory.getLogger(MakerSendsSignOfferRequest.class); private static final Logger log = LoggerFactory.getLogger(MakerSendSignOfferRequest.class);
private boolean failed = false; private boolean failed = false;
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public MakerSendsSignOfferRequest(TaskRunner taskHandler, PlaceOfferModel model) { public MakerSendSignOfferRequest(TaskRunner taskHandler, PlaceOfferModel model) {
super(taskHandler, model); super(taskHandler, model);
} }

View file

@ -12,11 +12,11 @@ import bisq.core.trade.messages.PayoutTxPublishedMessage;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.FluentProtocol.Condition; import bisq.core.trade.protocol.FluentProtocol.Condition;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.ArbitratorProcessesDepositRequest; import bisq.core.trade.protocol.tasks.ArbitratorProcessDepositRequest;
import bisq.core.trade.protocol.tasks.ArbitratorProcessesPaymentAccountKeyRequest; import bisq.core.trade.protocol.tasks.ArbitratorProcessPaymentAccountKeyRequest;
import bisq.core.trade.protocol.tasks.ArbitratorProcessesReserveTx; import bisq.core.trade.protocol.tasks.ArbitratorProcessReserveTx;
import bisq.core.trade.protocol.tasks.ArbitratorProcessPayoutTxPublishedMessage; import bisq.core.trade.protocol.tasks.ArbitratorProcessPayoutTxPublishedMessage;
import bisq.core.trade.protocol.tasks.ArbitratorSendsInitTradeOrMultisigRequests; import bisq.core.trade.protocol.tasks.ArbitratorSendInitTradeOrMultisigRequests;
import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest; import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest;
import bisq.core.util.Validator; import bisq.core.util.Validator;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
@ -61,8 +61,8 @@ public class ArbitratorProtocol extends DisputeProtocol {
.setup(tasks( .setup(tasks(
ApplyFilter.class, ApplyFilter.class,
ProcessInitTradeRequest.class, ProcessInitTradeRequest.class,
ArbitratorProcessesReserveTx.class, ArbitratorProcessReserveTx.class,
ArbitratorSendsInitTradeOrMultisigRequests.class) ArbitratorSendInitTradeOrMultisigRequests.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);
@ -92,7 +92,7 @@ public class ArbitratorProtocol extends DisputeProtocol {
.with(request) .with(request)
.from(sender)) .from(sender))
.setup(tasks( .setup(tasks(
ArbitratorProcessesDepositRequest.class) ArbitratorProcessDepositRequest.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
if (trade.getState() == Trade.State.ARBITRATOR_PUBLISHED_DEPOSIT_TXS) { if (trade.getState() == Trade.State.ARBITRATOR_PUBLISHED_DEPOSIT_TXS) {
@ -125,7 +125,7 @@ public class ArbitratorProtocol extends DisputeProtocol {
.with(request) .with(request)
.from(sender)) .from(sender))
.setup(tasks( .setup(tasks(
ArbitratorProcessesPaymentAccountKeyRequest.class) ArbitratorProcessPaymentAccountKeyRequest.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
stopTimeout(); stopTimeout();

View file

@ -26,7 +26,7 @@ import bisq.core.trade.messages.PaymentAccountKeyResponse;
import bisq.core.trade.messages.PaymentReceivedMessage; import bisq.core.trade.messages.PaymentReceivedMessage;
import bisq.core.trade.messages.SignContractRequest; import bisq.core.trade.messages.SignContractRequest;
import bisq.core.trade.messages.SignContractResponse; import bisq.core.trade.messages.SignContractResponse;
import bisq.core.trade.protocol.tasks.MakerSendsInitTradeRequest; import bisq.core.trade.protocol.tasks.MakerSendInitTradeRequest;
import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest; import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
import bisq.common.handlers.ErrorMessageHandler; import bisq.common.handlers.ErrorMessageHandler;
@ -64,7 +64,7 @@ public class BuyerAsMakerProtocol extends BuyerProtocol implements MakerProtocol
ProcessInitTradeRequest.class, ProcessInitTradeRequest.class,
//ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here //ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here
//VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee //VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee
MakerSendsInitTradeRequest.class) MakerSendInitTradeRequest.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);

View file

@ -30,8 +30,8 @@ import bisq.core.trade.messages.SignContractRequest;
import bisq.core.trade.messages.SignContractResponse; import bisq.core.trade.messages.SignContractResponse;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.TakerReservesTradeFunds; import bisq.core.trade.protocol.tasks.TakerReserveTradeFunds;
import bisq.core.trade.protocol.tasks.TakerSendsInitTradeRequestToArbitrator; import bisq.core.trade.protocol.tasks.TakerSendInitTradeRequestToArbitrator;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
import bisq.common.handlers.ErrorMessageHandler; import bisq.common.handlers.ErrorMessageHandler;
import bisq.common.handlers.ResultHandler; import bisq.common.handlers.ResultHandler;
@ -74,8 +74,8 @@ public class BuyerAsTakerProtocol extends BuyerProtocol implements TakerProtocol
.from(trade.getTradingPeerNodeAddress())) .from(trade.getTradingPeerNodeAddress()))
.setup(tasks( .setup(tasks(
ApplyFilter.class, ApplyFilter.class,
TakerReservesTradeFunds.class, TakerReserveTradeFunds.class,
TakerSendsInitTradeRequestToArbitrator.class) TakerSendInitTradeRequestToArbitrator.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);

View file

@ -25,13 +25,13 @@ import bisq.core.trade.messages.SignContractResponse;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.FluentProtocol.Condition; import bisq.core.trade.protocol.FluentProtocol.Condition;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.BuyerSendsPayoutTxPublishedMessage; import bisq.core.trade.protocol.tasks.BuyerSendPayoutTxPublishedMessage;
import bisq.core.trade.protocol.tasks.BuyerPreparesPaymentSentMessage; import bisq.core.trade.protocol.tasks.BuyerPreparePaymentSentMessage;
import bisq.core.trade.protocol.tasks.BuyerProcessesPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.BuyerProcessPaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.BuyerSendsPaymentAccountKeyRequestToArbitrator; import bisq.core.trade.protocol.tasks.BuyerSendPaymentAccountKeyRequestToArbitrator;
import bisq.core.trade.protocol.tasks.BuyerSendsPaymentSentMessage; import bisq.core.trade.protocol.tasks.BuyerSendPaymentSentMessage;
import bisq.core.trade.protocol.tasks.BuyerSetupPayoutTxListener; import bisq.core.trade.protocol.tasks.BuyerSetupPayoutTxListener;
import bisq.core.trade.protocol.tasks.BuyerProcessesPaymentAccountKeyResponse; import bisq.core.trade.protocol.tasks.BuyerProcessPaymentAccountKeyResponse;
import bisq.core.trade.protocol.tasks.SetupDepositTxsListener; import bisq.core.trade.protocol.tasks.SetupDepositTxsListener;
import bisq.core.util.Validator; import bisq.core.util.Validator;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
@ -83,7 +83,7 @@ public abstract class BuyerProtocol extends DisputeProtocol {
given(anyPhase(Trade.Phase.PAYMENT_SENT, Trade.Phase.PAYMENT_RECEIVED) given(anyPhase(Trade.Phase.PAYMENT_SENT, Trade.Phase.PAYMENT_RECEIVED)
.anyState(Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG, Trade.State.BUYER_SEND_FAILED_PAYMENT_SENT_MSG) .anyState(Trade.State.BUYER_STORED_IN_MAILBOX_PAYMENT_SENT_MSG, Trade.State.BUYER_SEND_FAILED_PAYMENT_SENT_MSG)
.with(BuyerEvent.STARTUP)) .with(BuyerEvent.STARTUP))
.setup(tasks(BuyerSendsPaymentSentMessage.class)) .setup(tasks(BuyerSendPaymentSentMessage.class))
.executeTasks(); .executeTasks();
} }
@ -121,7 +121,7 @@ public abstract class BuyerProtocol extends DisputeProtocol {
expect(new Condition(trade) expect(new Condition(trade)
.with(response) .with(response)
.from(sender)) .from(sender))
.setup(tasks(BuyerProcessesPaymentAccountKeyResponse.class) .setup(tasks(BuyerProcessPaymentAccountKeyResponse.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
handleTaskRunnerSuccess(sender, response); handleTaskRunnerSuccess(sender, response);
@ -152,9 +152,9 @@ public abstract class BuyerProtocol extends DisputeProtocol {
.preCondition(trade.confirmPermitted())) .preCondition(trade.confirmPermitted()))
.setup(tasks(ApplyFilter.class, .setup(tasks(ApplyFilter.class,
//UpdateMultisigWithTradingPeer.class, // TODO (woodser): can use this to test protocol with updated multisig from peer. peer should attempt to send updated multisig hex earlier as part of protocol. cannot use with countdown latch because response comes back in a separate thread and blocks on trade //UpdateMultisigWithTradingPeer.class, // TODO (woodser): can use this to test protocol with updated multisig from peer. peer should attempt to send updated multisig hex earlier as part of protocol. cannot use with countdown latch because response comes back in a separate thread and blocks on trade
BuyerPreparesPaymentSentMessage.class, BuyerPreparePaymentSentMessage.class,
//BuyerSetupPayoutTxListener.class, //BuyerSetupPayoutTxListener.class,
BuyerSendsPaymentSentMessage.class) // don't latch trade because this blocks and runs in background BuyerSendPaymentSentMessage.class) // don't latch trade because this blocks and runs in background
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
this.errorMessageHandler = null; this.errorMessageHandler = null;
@ -190,8 +190,8 @@ public abstract class BuyerProtocol extends DisputeProtocol {
.with(message) .with(message)
.from(peer)) .from(peer))
.setup(tasks( .setup(tasks(
BuyerProcessesPaymentReceivedMessage.class, BuyerProcessPaymentReceivedMessage.class,
BuyerSendsPayoutTxPublishedMessage.class) BuyerSendPayoutTxPublishedMessage.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
handleTaskRunnerSuccess(peer, message); handleTaskRunnerSuccess(peer, message);
@ -241,7 +241,7 @@ public abstract class BuyerProtocol extends DisputeProtocol {
if (trade.getSeller().getPaymentAccountPayload() != null) return; // skip if initialized if (trade.getSeller().getPaymentAccountPayload() != null) return; // skip if initialized
latchTrade(); latchTrade();
expect(new Condition(trade)) expect(new Condition(trade))
.setup(tasks(BuyerSendsPaymentAccountKeyRequestToArbitrator.class) .setup(tasks(BuyerSendPaymentAccountKeyRequestToArbitrator.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
handleTaskRunnerSuccess(event); handleTaskRunnerSuccess(event);

View file

@ -27,7 +27,7 @@ import bisq.core.trade.messages.DepositResponse;
import bisq.core.trade.messages.InitMultisigRequest; import bisq.core.trade.messages.InitMultisigRequest;
import bisq.core.trade.messages.InitTradeRequest; import bisq.core.trade.messages.InitTradeRequest;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.tasks.MakerSendsInitTradeRequest; import bisq.core.trade.protocol.tasks.MakerSendInitTradeRequest;
import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest; import bisq.core.trade.protocol.tasks.ProcessInitTradeRequest;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
import bisq.common.handlers.ErrorMessageHandler; import bisq.common.handlers.ErrorMessageHandler;
@ -65,7 +65,7 @@ public class SellerAsMakerProtocol extends SellerProtocol implements MakerProtoc
ProcessInitTradeRequest.class, ProcessInitTradeRequest.class,
//ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here //ApplyFilter.class, // TODO (woodser): these checks apply when maker signs availability request, but not here
//VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee //VerifyPeersAccountAgeWitness.class, // TODO (woodser): these checks apply after in multisig, means if rejected need to reimburse other's fee
MakerSendsInitTradeRequest.class) MakerSendInitTradeRequest.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);

View file

@ -29,8 +29,8 @@ import bisq.core.trade.messages.DepositResponse;
import bisq.core.trade.messages.InitMultisigRequest; import bisq.core.trade.messages.InitMultisigRequest;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.TakerReservesTradeFunds; import bisq.core.trade.protocol.tasks.TakerReserveTradeFunds;
import bisq.core.trade.protocol.tasks.TakerSendsInitTradeRequestToArbitrator; import bisq.core.trade.protocol.tasks.TakerSendInitTradeRequestToArbitrator;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
import bisq.common.handlers.ErrorMessageHandler; import bisq.common.handlers.ErrorMessageHandler;
import bisq.common.handlers.ResultHandler; import bisq.common.handlers.ResultHandler;
@ -72,8 +72,8 @@ public class SellerAsTakerProtocol extends SellerProtocol implements TakerProtoc
.from(trade.getTradingPeerNodeAddress())) .from(trade.getTradingPeerNodeAddress()))
.setup(tasks( .setup(tasks(
ApplyFilter.class, ApplyFilter.class,
TakerReservesTradeFunds.class, TakerReserveTradeFunds.class,
TakerSendsInitTradeRequestToArbitrator.class) TakerSendInitTradeRequestToArbitrator.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);

View file

@ -24,11 +24,11 @@ import bisq.core.trade.messages.SignContractResponse;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.protocol.FluentProtocol.Condition; import bisq.core.trade.protocol.FluentProtocol.Condition;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.SellerMaybeSendsPayoutTxPublishedMessage; import bisq.core.trade.protocol.tasks.SellerMaybeSendPayoutTxPublishedMessage;
import bisq.core.trade.protocol.tasks.SellerPreparesPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.SellerPreparePaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.SellerProcessesPaymentSentMessage; import bisq.core.trade.protocol.tasks.SellerProcessPaymentSentMessage;
import bisq.core.trade.protocol.tasks.SellerSendsPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.SellerSendPaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.SellerSendsPaymentAccountPayloadKey; import bisq.core.trade.protocol.tasks.SellerSendPaymentAccountPayloadKey;
import bisq.core.trade.protocol.tasks.SetupDepositTxsListener; import bisq.core.trade.protocol.tasks.SetupDepositTxsListener;
import bisq.network.p2p.NodeAddress; import bisq.network.p2p.NodeAddress;
import bisq.common.handlers.ErrorMessageHandler; import bisq.common.handlers.ErrorMessageHandler;
@ -122,7 +122,7 @@ public abstract class SellerProtocol extends DisputeProtocol {
})) }))
.setup(tasks( .setup(tasks(
ApplyFilter.class, ApplyFilter.class,
SellerProcessesPaymentSentMessage.class) SellerProcessPaymentSentMessage.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
handleTaskRunnerSuccess(peer, message); handleTaskRunnerSuccess(peer, message);
@ -154,9 +154,9 @@ public abstract class SellerProtocol extends DisputeProtocol {
.preCondition(trade.confirmPermitted())) .preCondition(trade.confirmPermitted()))
.setup(tasks( .setup(tasks(
ApplyFilter.class, ApplyFilter.class,
SellerPreparesPaymentReceivedMessage.class, SellerPreparePaymentReceivedMessage.class,
SellerMaybeSendsPayoutTxPublishedMessage.class, SellerMaybeSendPayoutTxPublishedMessage.class,
SellerSendsPaymentReceivedMessage.class) SellerSendPaymentReceivedMessage.class)
.using(new TradeTaskRunner(trade, () -> { .using(new TradeTaskRunner(trade, () -> {
this.errorMessageHandler = null; this.errorMessageHandler = null;
handleTaskRunnerSuccess(event); handleTaskRunnerSuccess(event);
@ -182,7 +182,7 @@ public abstract class SellerProtocol extends DisputeProtocol {
synchronized (trade) { synchronized (trade) {
latchTrade(); latchTrade();
expect(new Condition(trade)) expect(new Condition(trade))
.setup(tasks(SellerSendsPaymentAccountPayloadKey.class) .setup(tasks(SellerSendPaymentAccountPayloadKey.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
handleTaskRunnerSuccess(event); handleTaskRunnerSuccess(event);

View file

@ -29,7 +29,7 @@ import bisq.core.trade.messages.SignContractRequest;
import bisq.core.trade.messages.SignContractResponse; import bisq.core.trade.messages.SignContractResponse;
import bisq.core.trade.messages.TradeMessage; import bisq.core.trade.messages.TradeMessage;
import bisq.core.trade.messages.UpdateMultisigRequest; import bisq.core.trade.messages.UpdateMultisigRequest;
import bisq.core.trade.protocol.tasks.MaybeRemoveOpenOffer; import bisq.core.trade.protocol.tasks.MakerRemoveOpenOffer;
import bisq.core.trade.protocol.tasks.MaybeSendSignContractRequest; import bisq.core.trade.protocol.tasks.MaybeSendSignContractRequest;
import bisq.core.trade.protocol.tasks.ProcessDepositResponse; import bisq.core.trade.protocol.tasks.ProcessDepositResponse;
import bisq.core.trade.protocol.tasks.ProcessInitMultisigRequest; import bisq.core.trade.protocol.tasks.ProcessInitMultisigRequest;
@ -301,7 +301,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
.setup(tasks( .setup(tasks(
// TODO (woodser): validate request // TODO (woodser): validate request
ProcessSignContractResponse.class, ProcessSignContractResponse.class,
MaybeRemoveOpenOffer.class) MakerRemoveOpenOffer.class)
.using(new TradeTaskRunner(trade, .using(new TradeTaskRunner(trade,
() -> { () -> {
startTimeout(TRADE_TIMEOUT); startTimeout(TRADE_TIMEOUT);

View file

@ -38,10 +38,10 @@ import lombok.extern.slf4j.Slf4j;
import monero.daemon.MoneroDaemon; import monero.daemon.MoneroDaemon;
@Slf4j @Slf4j
public class ArbitratorProcessesDepositRequest extends TradeTask { public class ArbitratorProcessDepositRequest extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public ArbitratorProcessesDepositRequest(TaskRunner taskHandler, Trade trade) { public ArbitratorProcessDepositRequest(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -29,10 +29,10 @@ import java.util.UUID;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class ArbitratorProcessesPaymentAccountKeyRequest extends TradeTask { public class ArbitratorProcessPaymentAccountKeyRequest extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public ArbitratorProcessesPaymentAccountKeyRequest(TaskRunner taskHandler, Trade trade) { public ArbitratorProcessPaymentAccountKeyRequest(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -34,9 +34,9 @@ import lombok.extern.slf4j.Slf4j;
* the original offer signer and thus does not have the original reserve tx. * the original offer signer and thus does not have the original reserve tx.
*/ */
@Slf4j @Slf4j
public class ArbitratorProcessesReserveTx extends TradeTask { public class ArbitratorProcessReserveTx extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public ArbitratorProcessesReserveTx(TaskRunner taskHandler, Trade trade) { public ArbitratorProcessReserveTx(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -41,10 +41,10 @@ import monero.wallet.MoneroWallet;
* Arbitrator sends InitMultisigRequests after the maker acks. * Arbitrator sends InitMultisigRequests after the maker acks.
*/ */
@Slf4j @Slf4j
public class ArbitratorSendsInitTradeOrMultisigRequests extends TradeTask { public class ArbitratorSendInitTradeOrMultisigRequests extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public ArbitratorSendsInitTradeOrMultisigRequests(TaskRunner taskHandler, Trade trade) { public ArbitratorSendInitTradeOrMultisigRequests(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -40,10 +40,10 @@ import monero.wallet.model.MoneroSubaddress;
import monero.wallet.model.MoneroTxWallet; import monero.wallet.model.MoneroTxWallet;
@Slf4j @Slf4j
public class BuyerPreparesPaymentSentMessage extends TradeTask { public class BuyerPreparePaymentSentMessage extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public BuyerPreparesPaymentSentMessage(TaskRunner taskHandler, Trade trade) { public BuyerPreparePaymentSentMessage(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -24,10 +24,10 @@ import bisq.core.trade.messages.PaymentAccountKeyResponse;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class BuyerProcessesPaymentAccountKeyResponse extends TradeTask { public class BuyerProcessPaymentAccountKeyResponse extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public BuyerProcessesPaymentAccountKeyResponse(TaskRunner taskHandler, Trade trade) { public BuyerProcessPaymentAccountKeyResponse(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -37,8 +37,8 @@ import static com.google.common.base.Preconditions.checkNotNull;
import monero.wallet.MoneroWallet; import monero.wallet.MoneroWallet;
@Slf4j @Slf4j
public class BuyerProcessesPaymentReceivedMessage extends TradeTask { public class BuyerProcessPaymentReceivedMessage extends TradeTask {
public BuyerProcessesPaymentReceivedMessage(TaskRunner<Trade> taskHandler, Trade trade) { public BuyerProcessPaymentReceivedMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -27,10 +27,10 @@ import java.util.UUID;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class BuyerSendsPaymentAccountKeyRequestToArbitrator extends TradeTask { public class BuyerSendPaymentAccountKeyRequestToArbitrator extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public BuyerSendsPaymentAccountKeyRequestToArbitrator(TaskRunner taskHandler, Trade trade) { public BuyerSendPaymentAccountKeyRequestToArbitrator(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -40,12 +40,12 @@ import lombok.extern.slf4j.Slf4j;
* online he will process it. * online he will process it.
*/ */
@Slf4j @Slf4j
public class BuyerSendsPaymentSentMessage extends SendMailboxMessageTask { public class BuyerSendPaymentSentMessage extends SendMailboxMessageTask {
private PaymentSentMessage message; private PaymentSentMessage message;
private ChangeListener<MessageState> listener; private ChangeListener<MessageState> listener;
private Timer timer; private Timer timer;
public BuyerSendsPaymentSentMessage(TaskRunner<Trade> taskHandler, Trade trade) { public BuyerSendPaymentSentMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -32,9 +32,9 @@ import lombok.extern.slf4j.Slf4j;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Slf4j @Slf4j
public class BuyerSendsPayoutTxPublishedMessage extends SendMailboxMessageTask { public class BuyerSendPayoutTxPublishedMessage extends SendMailboxMessageTask {
public BuyerSendsPayoutTxPublishedMessage(TaskRunner<Trade> taskHandler, Trade trade) { public BuyerSendPayoutTxPublishedMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -26,8 +26,8 @@ import lombok.extern.slf4j.Slf4j;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@Slf4j @Slf4j
public class MaybeRemoveOpenOffer extends TradeTask { public class MakerRemoveOpenOffer extends TradeTask {
public MaybeRemoveOpenOffer(TaskRunner<Trade> taskHandler, Trade trade) { public MakerRemoveOpenOffer(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -37,9 +37,9 @@ import static bisq.core.util.Validator.checkTradeId;
import static com.google.common.base.Preconditions.checkNotNull; import static com.google.common.base.Preconditions.checkNotNull;
@Slf4j @Slf4j
public class MakerSendsInitTradeRequest extends TradeTask { public class MakerSendInitTradeRequest extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public MakerSendsInitTradeRequest(TaskRunner taskHandler, Trade trade) { public MakerSendInitTradeRequest(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -25,8 +25,8 @@ import bisq.common.taskrunner.TaskRunner;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class MakerSetsLockTime extends TradeTask { public class MakerSetLockTime extends TradeTask {
public MakerSetsLockTime(TaskRunner<Trade> taskHandler, Trade trade) { public MakerSetLockTime(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -30,9 +30,9 @@ import lombok.extern.slf4j.Slf4j;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Slf4j @Slf4j
public class SellerMaybeSendsPayoutTxPublishedMessage extends SendMailboxMessageTask { public class SellerMaybeSendPayoutTxPublishedMessage extends SendMailboxMessageTask {
public SellerMaybeSendsPayoutTxPublishedMessage(TaskRunner<Trade> taskHandler, Trade trade) { public SellerMaybeSendPayoutTxPublishedMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -25,10 +25,10 @@ import lombok.extern.slf4j.Slf4j;
import monero.wallet.model.MoneroTxWallet; import monero.wallet.model.MoneroTxWallet;
@Slf4j @Slf4j
public class SellerPreparesPaymentReceivedMessage extends TradeTask { public class SellerPreparePaymentReceivedMessage extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public SellerPreparesPaymentReceivedMessage(TaskRunner taskHandler, Trade trade) { public SellerPreparePaymentReceivedMessage(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -28,8 +28,8 @@ import lombok.extern.slf4j.Slf4j;
import monero.wallet.MoneroWallet; import monero.wallet.MoneroWallet;
@Slf4j @Slf4j
public class SellerProcessesPaymentSentMessage extends TradeTask { public class SellerProcessPaymentSentMessage extends TradeTask {
public SellerProcessesPaymentSentMessage(TaskRunner<Trade> taskHandler, Trade trade) { public SellerProcessPaymentSentMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -23,8 +23,8 @@ import bisq.common.taskrunner.TaskRunner;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class SellerPublishesDepositTx extends TradeTask { public class SellerPublishDepositTx extends TradeTask {
public SellerPublishesDepositTx(TaskRunner<Trade> taskHandler, Trade trade) { public SellerPublishDepositTx(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -23,8 +23,8 @@ import bisq.common.taskrunner.TaskRunner;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class SellerPublishesTradeStatistics extends TradeTask { public class SellerPublishTradeStatistics extends TradeTask {
public SellerPublishesTradeStatistics(TaskRunner<Trade> taskHandler, Trade trade) { public SellerPublishTradeStatistics(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -31,10 +31,10 @@ import monero.wallet.MoneroWallet;
* Allow sender's payment account info to be decrypted when trade state is confirmed. * Allow sender's payment account info to be decrypted when trade state is confirmed.
*/ */
@Slf4j @Slf4j
public class SellerSendsPaymentAccountPayloadKey extends SendMailboxMessageTask { public class SellerSendPaymentAccountPayloadKey extends SendMailboxMessageTask {
private PaymentAccountKeyResponse message; private PaymentAccountKeyResponse message;
public SellerSendsPaymentAccountPayloadKey(TaskRunner<Trade> taskHandler, Trade trade) { public SellerSendPaymentAccountPayloadKey(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -30,10 +30,10 @@ import static com.google.common.base.Preconditions.checkNotNull;
@EqualsAndHashCode(callSuper = true) @EqualsAndHashCode(callSuper = true)
@Slf4j @Slf4j
public class SellerSendsPaymentReceivedMessage extends SendMailboxMessageTask { public class SellerSendPaymentReceivedMessage extends SendMailboxMessageTask {
SignedWitness signedWitness = null; SignedWitness signedWitness = null;
public SellerSendsPaymentReceivedMessage(TaskRunner<Trade> taskHandler, Trade trade) { public SellerSendPaymentReceivedMessage(TaskRunner<Trade> taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -27,9 +27,9 @@ import java.util.List;
import monero.daemon.model.MoneroOutput; import monero.daemon.model.MoneroOutput;
import monero.wallet.model.MoneroTxWallet; import monero.wallet.model.MoneroTxWallet;
public class TakerReservesTradeFunds extends TradeTask { public class TakerReserveTradeFunds extends TradeTask {
public TakerReservesTradeFunds(TaskRunner taskHandler, Trade trade) { public TakerReserveTradeFunds(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -37,10 +37,10 @@ import bisq.common.taskrunner.TaskRunner;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
@Slf4j @Slf4j
public class TakerSendsInitTradeRequestToArbitrator extends TradeTask { public class TakerSendInitTradeRequestToArbitrator extends TradeTask {
@SuppressWarnings({"unused"}) @SuppressWarnings({"unused"})
public TakerSendsInitTradeRequestToArbitrator(TaskRunner taskHandler, Trade trade) { public TakerSendInitTradeRequestToArbitrator(TaskRunner taskHandler, Trade trade) {
super(taskHandler, trade); super(taskHandler, trade);
} }

View file

@ -24,20 +24,20 @@ import bisq.desktop.components.TitledGroupBg;
import bisq.core.offer.availability.tasks.ProcessOfferAvailabilityResponse; import bisq.core.offer.availability.tasks.ProcessOfferAvailabilityResponse;
import bisq.core.offer.availability.tasks.SendOfferAvailabilityRequest; import bisq.core.offer.availability.tasks.SendOfferAvailabilityRequest;
import bisq.core.offer.placeoffer.tasks.AddToOfferBook; import bisq.core.offer.placeoffer.tasks.AddToOfferBook;
import bisq.core.offer.placeoffer.tasks.MakerReservesOfferFunds; import bisq.core.offer.placeoffer.tasks.MakerReserveOfferFunds;
import bisq.core.offer.placeoffer.tasks.ValidateOffer; import bisq.core.offer.placeoffer.tasks.ValidateOffer;
import bisq.core.trade.protocol.tasks.ApplyFilter; import bisq.core.trade.protocol.tasks.ApplyFilter;
import bisq.core.trade.protocol.tasks.BuyerPreparesPaymentSentMessage; import bisq.core.trade.protocol.tasks.BuyerPreparePaymentSentMessage;
import bisq.core.trade.protocol.tasks.BuyerProcessesPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.BuyerProcessPaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.BuyerSendsPaymentSentMessage; import bisq.core.trade.protocol.tasks.BuyerSendPaymentSentMessage;
import bisq.core.trade.protocol.tasks.BuyerSetupPayoutTxListener; import bisq.core.trade.protocol.tasks.BuyerSetupPayoutTxListener;
import bisq.core.trade.protocol.tasks.MakerSetsLockTime; import bisq.core.trade.protocol.tasks.MakerSetLockTime;
import bisq.core.trade.protocol.tasks.MaybeRemoveOpenOffer; import bisq.core.trade.protocol.tasks.MakerRemoveOpenOffer;
import bisq.core.trade.protocol.tasks.SellerPreparesPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.SellerPreparePaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.SellerProcessesPaymentSentMessage; import bisq.core.trade.protocol.tasks.SellerProcessPaymentSentMessage;
import bisq.core.trade.protocol.tasks.SellerPublishesDepositTx; import bisq.core.trade.protocol.tasks.SellerPublishDepositTx;
import bisq.core.trade.protocol.tasks.SellerPublishesTradeStatistics; import bisq.core.trade.protocol.tasks.SellerPublishTradeStatistics;
import bisq.core.trade.protocol.tasks.SellerSendsPaymentReceivedMessage; import bisq.core.trade.protocol.tasks.SellerSendPaymentReceivedMessage;
import bisq.core.trade.protocol.tasks.TakerVerifyMakerFeePayment; import bisq.core.trade.protocol.tasks.TakerVerifyMakerFeePayment;
import bisq.core.trade.protocol.tasks.VerifyPeersAccountAgeWitness; import bisq.core.trade.protocol.tasks.VerifyPeersAccountAgeWitness;
import bisq.common.taskrunner.Task; import bisq.common.taskrunner.Task;
@ -84,7 +84,7 @@ public class DebugView extends InitializableView<GridPane, Void> {
addGroup("PlaceOfferProtocol", addGroup("PlaceOfferProtocol",
FXCollections.observableArrayList(Arrays.asList( FXCollections.observableArrayList(Arrays.asList(
ValidateOffer.class, ValidateOffer.class,
MakerReservesOfferFunds.class, MakerReserveOfferFunds.class,
AddToOfferBook.class) AddToOfferBook.class)
)); ));
@ -98,18 +98,18 @@ public class DebugView extends InitializableView<GridPane, Void> {
VerifyPeersAccountAgeWitness.class, VerifyPeersAccountAgeWitness.class,
//SellerSendsDepositTxAndDelayedPayoutTxMessage.class, //SellerSendsDepositTxAndDelayedPayoutTxMessage.class,
SellerPublishesDepositTx.class, SellerPublishDepositTx.class,
SellerPublishesTradeStatistics.class, SellerPublishTradeStatistics.class,
SellerProcessesPaymentSentMessage.class, SellerProcessPaymentSentMessage.class,
ApplyFilter.class, ApplyFilter.class,
TakerVerifyMakerFeePayment.class, TakerVerifyMakerFeePayment.class,
ApplyFilter.class, ApplyFilter.class,
TakerVerifyMakerFeePayment.class, TakerVerifyMakerFeePayment.class,
SellerPreparesPaymentReceivedMessage.class, SellerPreparePaymentReceivedMessage.class,
//SellerBroadcastPayoutTx.class, // TODO (woodser): removed from main pipeline; debug view? //SellerBroadcastPayoutTx.class, // TODO (woodser): removed from main pipeline; debug view?
SellerSendsPaymentReceivedMessage.class SellerSendPaymentReceivedMessage.class
) )
)); ));
@ -117,16 +117,16 @@ public class DebugView extends InitializableView<GridPane, Void> {
FXCollections.observableArrayList(Arrays.asList( FXCollections.observableArrayList(Arrays.asList(
ApplyFilter.class, ApplyFilter.class,
VerifyPeersAccountAgeWitness.class, VerifyPeersAccountAgeWitness.class,
MakerSetsLockTime.class, MakerSetLockTime.class,
MaybeRemoveOpenOffer.class, MakerRemoveOpenOffer.class,
ApplyFilter.class, ApplyFilter.class,
BuyerPreparesPaymentSentMessage.class, BuyerPreparePaymentSentMessage.class,
BuyerSetupPayoutTxListener.class, BuyerSetupPayoutTxListener.class,
BuyerSendsPaymentSentMessage.class, BuyerSendPaymentSentMessage.class,
BuyerProcessesPaymentReceivedMessage.class BuyerProcessPaymentReceivedMessage.class
) )
)); ));
@ -141,32 +141,32 @@ public class DebugView extends InitializableView<GridPane, Void> {
ApplyFilter.class, ApplyFilter.class,
TakerVerifyMakerFeePayment.class, TakerVerifyMakerFeePayment.class,
BuyerPreparesPaymentSentMessage.class, BuyerPreparePaymentSentMessage.class,
BuyerSetupPayoutTxListener.class, BuyerSetupPayoutTxListener.class,
BuyerSendsPaymentSentMessage.class, BuyerSendPaymentSentMessage.class,
BuyerProcessesPaymentReceivedMessage.class) BuyerProcessPaymentReceivedMessage.class)
)); ));
addGroup("SellerAsMakerProtocol", addGroup("SellerAsMakerProtocol",
FXCollections.observableArrayList(Arrays.asList( FXCollections.observableArrayList(Arrays.asList(
ApplyFilter.class, ApplyFilter.class,
VerifyPeersAccountAgeWitness.class, VerifyPeersAccountAgeWitness.class,
MakerSetsLockTime.class, MakerSetLockTime.class,
//SellerAsMakerProcessDepositTxMessage.class, //SellerAsMakerProcessDepositTxMessage.class,
MaybeRemoveOpenOffer.class, MakerRemoveOpenOffer.class,
//SellerSendsDepositTxAndDelayedPayoutTxMessage.class, //SellerSendsDepositTxAndDelayedPayoutTxMessage.class,
SellerPublishesDepositTx.class, SellerPublishDepositTx.class,
SellerPublishesTradeStatistics.class, SellerPublishTradeStatistics.class,
SellerProcessesPaymentSentMessage.class, SellerProcessPaymentSentMessage.class,
ApplyFilter.class, ApplyFilter.class,
ApplyFilter.class, ApplyFilter.class,
SellerPreparesPaymentReceivedMessage.class, SellerPreparePaymentReceivedMessage.class,
//SellerBroadcastPayoutTx.class, // TODO (woodser): removed from main pipeline; debug view? //SellerBroadcastPayoutTx.class, // TODO (woodser): removed from main pipeline; debug view?
SellerSendsPaymentReceivedMessage.class SellerSendPaymentReceivedMessage.class
) )
)); ));
} }