Skip to content

Commit 1227f85

Browse files
committed
finalize payouts in 60 confirmations on testnet without idling
1 parent 302aa29 commit 1227f85

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

core/src/main/java/haveno/core/trade/Trade.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
import haveno.common.ThreadUtils;
4141
import haveno.common.Timer;
4242
import haveno.common.UserThread;
43+
import haveno.common.config.Config;
4344
import haveno.common.crypto.Encryption;
4445
import haveno.common.crypto.PubKeyRing;
4546
import haveno.common.proto.ProtoUtil;
@@ -154,7 +155,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
154155
private static final long DELETE_AFTER_MS = TradeProtocol.TRADE_STEP_TIMEOUT_SECONDS;
155156
private static final int NUM_CONFIRMATIONS_FOR_SCHEDULED_IMPORT = 5;
156157
public static final int NUM_BLOCKS_DEPOSITS_FINALIZED = 30; // ~1 hour before deposits are considered finalized
157-
public static final int NUM_BLOCKS_PAYOUT_FINALIZED = 720; // ~1 day before payout is considered finalized and multisig wallet deleted
158+
public static final int NUM_BLOCKS_PAYOUT_FINALIZED = Config.baseCurrencyNetwork().isTestnet() ? 60 : 720; // ~1 day before payout is considered finalized and multisig wallet deleted
158159
protected final Object pollLock = new Object();
159160
private final Object removeTradeOnErrorLock = new Object();
160161
protected static final Object importMultisigLock = new Object();
@@ -957,7 +958,7 @@ public boolean isWalletConnectedToDaemon() {
957958
}
958959

959960
public boolean isIdling() {
960-
if (isPayoutUnlocked()) return true; // idle after payout unlocked
961+
if (isPayoutUnlocked() && !Config.baseCurrencyNetwork().isTestnet()) return true; // idle after payout unlocked (unless testnet)
961962
return this instanceof ArbitratorTrade && isDepositsConfirmed() && walletExists() && pollNormalStartTimeMs == null; // arbitrator idles trade after deposits confirm unless overriden
962963
}
963964

0 commit comments

Comments
 (0)