File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed
core/src/main/java/haveno/core/trade Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -2302,6 +2302,10 @@ public boolean isInPreparation() {
2302
2302
return getState ().getPhase ().ordinal () == Phase .INIT .ordinal ();
2303
2303
}
2304
2304
2305
+ public boolean isFundsLockedIn () {
2306
+ return isDepositsPublished () && !isPayoutPublished ();
2307
+ }
2308
+
2305
2309
public boolean isDepositRequested () {
2306
2310
return getState ().getPhase ().ordinal () >= Phase .DEPOSIT_REQUESTED .ordinal ();
2307
2311
}
@@ -2315,8 +2319,8 @@ public boolean isDepositsPublished() {
2315
2319
return getState ().getPhase ().ordinal () >= Phase .DEPOSITS_PUBLISHED .ordinal () && getMaker ().getDepositTxHash () != null && (getTaker ().getDepositTxHash () != null || hasBuyerAsTakerWithoutDeposit ());
2316
2320
}
2317
2321
2318
- public boolean isFundsLockedIn () {
2319
- return isDepositsPublished () && ! isPayoutPublished ();
2322
+ public boolean isDepositsSeen () {
2323
+ return isDepositsPublished () && getState (). ordinal () >= State . DEPOSIT_TXS_SEEN_IN_NETWORK . ordinal ();
2320
2324
}
2321
2325
2322
2326
public boolean isDepositsConfirmed () {
@@ -2836,6 +2840,9 @@ private void doPollWallet() {
2836
2840
if (getMaker ().getDepositTx ().getNumConfirmations () >= NUM_BLOCKS_DEPOSITS_FINALIZED && (hasBuyerAsTakerWithoutDeposit () || getTaker ().getDepositTx ().getNumConfirmations () >= NUM_BLOCKS_DEPOSITS_FINALIZED )) {
2837
2841
setStateDepositsFinalized ();
2838
2842
}
2843
+ } else if (isDepositsSeen ()) {
2844
+ log .warn ("Resetting state to deposit txs failed for {} {} because one or both deposit txs no longer seen as valid" , getClass ().getSimpleName (), getShortId ());
2845
+ setState (Trade .State .PUBLISH_DEPOSIT_TX_REQUEST_FAILED );
2839
2846
}
2840
2847
}
2841
2848
You can’t perform that action at this time.
0 commit comments