mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-25 23:39:26 -05:00
remove timeout confirming payment sent/received & revert state on error
This commit is contained in:
parent
0ead6d8f83
commit
5c0d9a1ae5
@ -140,9 +140,10 @@ public class BuyerProtocol extends DisputeProtocol {
|
|||||||
handleTaskRunnerSuccess(event);
|
handleTaskRunnerSuccess(event);
|
||||||
},
|
},
|
||||||
(errorMessage) -> {
|
(errorMessage) -> {
|
||||||
|
log.warn("Error confirming payment sent, reverting state to {}, error={}", Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN, errorMessage);
|
||||||
|
trade.setState(Trade.State.DEPOSIT_TXS_UNLOCKED_IN_BLOCKCHAIN);
|
||||||
handleTaskRunnerFault(event, errorMessage);
|
handleTaskRunnerFault(event, errorMessage);
|
||||||
}))
|
})))
|
||||||
.withTimeout(TradeProtocol.TRADE_TIMEOUT_SECONDS))
|
|
||||||
.run(() -> trade.advanceState(Trade.State.BUYER_CONFIRMED_PAYMENT_SENT))
|
.run(() -> trade.advanceState(Trade.State.BUYER_CONFIRMED_PAYMENT_SENT))
|
||||||
.executeTasks(true);
|
.executeTasks(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -136,9 +136,10 @@ public class SellerProtocol extends DisputeProtocol {
|
|||||||
handleTaskRunnerSuccess(event);
|
handleTaskRunnerSuccess(event);
|
||||||
resultHandler.handleResult();
|
resultHandler.handleResult();
|
||||||
}, (errorMessage) -> {
|
}, (errorMessage) -> {
|
||||||
|
log.warn("Error confirming payment received, reverting state to {}, error={}", Trade.State.BUYER_SENT_PAYMENT_SENT_MSG, errorMessage);
|
||||||
|
trade.setState(Trade.State.BUYER_SENT_PAYMENT_SENT_MSG);
|
||||||
handleTaskRunnerFault(event, errorMessage);
|
handleTaskRunnerFault(event, errorMessage);
|
||||||
}))
|
})))
|
||||||
.withTimeout(TradeProtocol.TRADE_TIMEOUT_SECONDS))
|
|
||||||
.run(() -> trade.advanceState(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT))
|
.run(() -> trade.advanceState(Trade.State.SELLER_CONFIRMED_PAYMENT_RECEIPT))
|
||||||
.executeTasks(true);
|
.executeTasks(true);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user