do not resend deposits confirmed message after payout published
This commit is contained in:
parent
0c149b780f
commit
7bfba15109
@ -264,16 +264,11 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void maybeSendDepositsConfirmedMessage() {
|
private void maybeSendDepositsConfirmedMessage() {
|
||||||
if (trade.isDepositsConfirmed()) {
|
|
||||||
new Thread(() -> maybeSendDepositsConfirmedMessages()).start();
|
new Thread(() -> maybeSendDepositsConfirmedMessages()).start();
|
||||||
} else {
|
|
||||||
EasyBind.subscribe(trade.stateProperty(), state -> {
|
EasyBind.subscribe(trade.stateProperty(), state -> {
|
||||||
if (trade.isDepositsConfirmed()) {
|
|
||||||
new Thread(() -> maybeSendDepositsConfirmedMessages()).start();
|
new Thread(() -> maybeSendDepositsConfirmedMessages()).start();
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
public void maybeReprocessPaymentReceivedMessage(boolean reprocessOnError) {
|
public void maybeReprocessPaymentReceivedMessage(boolean reprocessOnError) {
|
||||||
synchronized (trade) {
|
synchronized (trade) {
|
||||||
@ -880,8 +875,8 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void maybeSendDepositsConfirmedMessages() {
|
public void maybeSendDepositsConfirmedMessages() {
|
||||||
|
if (!trade.isDepositsConfirmed() || trade.isDepositsConfirmedAcked() || trade.isPayoutPublished()) return;
|
||||||
synchronized (trade) {
|
synchronized (trade) {
|
||||||
if (trade.isDepositsConfirmedAcked()) return;
|
|
||||||
if (!trade.isInitialized() || trade.isShutDownStarted()) return; // skip if shutting down
|
if (!trade.isInitialized() || trade.isShutDownStarted()) return; // skip if shutting down
|
||||||
latchTrade();
|
latchTrade();
|
||||||
expect(new Condition(trade))
|
expect(new Condition(trade))
|
||||||
|
Loading…
Reference in New Issue
Block a user