mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-03-12 09:31:15 +00:00
process payment confirmation messages off main thread
This commit is contained in:
parent
dbc7ff265a
commit
b95c689190
2 changed files with 58 additions and 54 deletions
|
@ -127,6 +127,7 @@ public abstract class BuyerProtocol extends DisputeProtocol {
|
|||
|
||||
protected void handle(PaymentReceivedMessage message, NodeAddress peer) {
|
||||
log.info("BuyerProtocol.handle(PaymentReceivedMessage)");
|
||||
new Thread(() -> {
|
||||
synchronized (trade) {
|
||||
latchTrade();
|
||||
Validator.checkTradeId(processModel.getOfferId(), message);
|
||||
|
@ -146,6 +147,7 @@ public abstract class BuyerProtocol extends DisputeProtocol {
|
|||
.executeTasks(true);
|
||||
awaitTradeLatch();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -77,6 +77,7 @@ public abstract class SellerProtocol extends DisputeProtocol {
|
|||
|
||||
protected void handle(PaymentSentMessage message, NodeAddress peer) {
|
||||
log.info("SellerProtocol.handle(PaymentSentMessage)");
|
||||
new Thread(() -> {
|
||||
// We are more tolerant with expected phase and allow also DEPOSITS_PUBLISHED as it can be the case
|
||||
// that the wallet is still syncing and so the DEPOSITS_CONFIRMED state to yet triggered when we received
|
||||
// a mailbox message with PaymentSentMessage.
|
||||
|
@ -113,6 +114,7 @@ public abstract class SellerProtocol extends DisputeProtocol {
|
|||
.executeTasks(true);
|
||||
awaitTradeLatch();
|
||||
}
|
||||
}).start();
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
Loading…
Reference in a new issue