Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix failed trade / missing payment information #5679

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 6 additions & 5 deletions core/src/main/java/bisq/core/trade/protocol/BuyerProtocol.java
Expand Up @@ -93,21 +93,22 @@ public void onMailboxMessage(TradeMessage message, NodeAddress peer) {

protected abstract void handle(DelayedPayoutTxSignatureRequest message, NodeAddress peer);

// The DepositTxAndDelayedPayoutTxMessage is a mailbox message as earlier we use only the deposit tx which can
// be also with from the network once published.
// The DepositTxAndDelayedPayoutTxMessage is a mailbox message. Earlier we used only the deposit tx which can
// be set also when received by the network once published by the peer so that message was not mandatory and could
// have arrived as mailbox message.
// Now we send the delayed payout tx as well and with that this message is mandatory for continuing the protocol.
// We do not support mailbox message handling during the take offer process as it is expected that both peers
// are online.
// For backward compatibility and extra resilience we still keep DepositTxAndDelayedPayoutTxMessage as a
// mailbox message but the stored in mailbox case is not expected and the seller would try to send the message again
// in the hope to reach the buyer directly.
// in the hope to reach the buyer directly in case of network issues.
protected void handle(DepositTxAndDelayedPayoutTxMessage message, NodeAddress peer) {
expect(anyPhase(Trade.Phase.TAKER_FEE_PUBLISHED, Trade.Phase.DEPOSIT_PUBLISHED)
.with(message)
.from(peer)
.preCondition(trade.getDepositTx() == null || trade.getDelayedPayoutTx() == null,
.preCondition(trade.getDepositTx() == null || processModel.getTradingPeer().getPaymentAccountPayload() == null,
() -> {
log.warn("We with a DepositTxAndDelayedPayoutTxMessage but we have already processed the deposit and " +
log.warn("We received a DepositTxAndDelayedPayoutTxMessage but we have already processed the deposit and " +
"delayed payout tx so we ignore the message. This can happen if the ACK message to the peer did not " +
"arrive and the peer repeats sending us the message. We send another ACK msg.");
stopTimeout();
Expand Down