mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-12-01 17:04:49 -05:00
delete trade wallets after 720 confirmations
This commit is contained in:
parent
6a22f9c6ae
commit
1a911fdb9d
2 changed files with 15 additions and 8 deletions
19
Makefile
19
Makefile
|
|
@ -70,11 +70,12 @@ monerod1-local:
|
|||
--log-level 0 \
|
||||
--add-exclusive-node 127.0.0.1:48080 \
|
||||
--add-exclusive-node 127.0.0.1:58080 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-access-control-origins http://localhost:8080 \
|
||||
--fixed-difficulty 500 \
|
||||
--disable-rpc-ban \
|
||||
--rpc-max-connections-per-private-ip 100 \
|
||||
--rpc-max-connections 1000 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-max-connections-per-private-ip 1000 \
|
||||
|
||||
monerod2-local:
|
||||
./.localnet/monerod \
|
||||
|
|
@ -90,11 +91,12 @@ monerod2-local:
|
|||
--confirm-external-bind \
|
||||
--add-exclusive-node 127.0.0.1:28080 \
|
||||
--add-exclusive-node 127.0.0.1:58080 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-access-control-origins http://localhost:8080 \
|
||||
--fixed-difficulty 500 \
|
||||
--disable-rpc-ban \
|
||||
--rpc-max-connections-per-private-ip 100 \
|
||||
--rpc-max-connections 1000 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-max-connections-per-private-ip 1000 \
|
||||
|
||||
monerod3-local:
|
||||
./.localnet/monerod \
|
||||
|
|
@ -110,11 +112,12 @@ monerod3-local:
|
|||
--confirm-external-bind \
|
||||
--add-exclusive-node 127.0.0.1:28080 \
|
||||
--add-exclusive-node 127.0.0.1:48080 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-access-control-origins http://localhost:8080 \
|
||||
--fixed-difficulty 500 \
|
||||
--disable-rpc-ban \
|
||||
--rpc-max-connections-per-private-ip 100 \
|
||||
--rpc-max-connections 1000 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-max-connections-per-private-ip 1000 \
|
||||
|
||||
#--proxy 127.0.0.1:49775 \
|
||||
|
||||
|
|
@ -440,7 +443,9 @@ monerod:
|
|||
./.localnet/monerod \
|
||||
--bootstrap-daemon-address auto \
|
||||
--rpc-access-control-origins http://localhost:8080 \
|
||||
--rpc-max-connections-per-private-ip 100 \
|
||||
--rpc-max-connections 1000 \
|
||||
--max-connections-per-ip 10 \
|
||||
--rpc-max-connections-per-private-ip 1000 \
|
||||
|
||||
seednode:
|
||||
./haveno-seednode$(APP_EXT) \
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@ import com.google.protobuf.Message;
|
|||
import haveno.common.ThreadUtils;
|
||||
import haveno.common.Timer;
|
||||
import haveno.common.UserThread;
|
||||
import haveno.common.config.Config;
|
||||
import haveno.common.crypto.Encryption;
|
||||
import haveno.common.crypto.PubKeyRing;
|
||||
import haveno.common.proto.ProtoUtil;
|
||||
|
|
@ -154,7 +155,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
|
|||
private static final long DELETE_AFTER_MS = TradeProtocol.TRADE_STEP_TIMEOUT_SECONDS;
|
||||
private static final int NUM_CONFIRMATIONS_FOR_SCHEDULED_IMPORT = 5;
|
||||
public static final int NUM_BLOCKS_DEPOSITS_FINALIZED = 30; // ~1 hour before deposits are considered finalized
|
||||
public static final int NUM_BLOCKS_PAYOUT_FINALIZED = 60; // ~2 hours before payout is considered finalized and multisig wallet deleted
|
||||
public static final int NUM_BLOCKS_PAYOUT_FINALIZED = Config.baseCurrencyNetwork().isTestnet() ? 60 : 720; // ~1 day before payout is considered finalized and multisig wallet deleted
|
||||
protected final Object pollLock = new Object();
|
||||
private final Object removeTradeOnErrorLock = new Object();
|
||||
protected static final Object importMultisigLock = new Object();
|
||||
|
|
@ -957,6 +958,7 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
|
|||
}
|
||||
|
||||
public boolean isIdling() {
|
||||
if (isPayoutUnlocked() && !Config.baseCurrencyNetwork().isTestnet()) return true; // idle after payout unlocked (unless testnet)
|
||||
return this instanceof ArbitratorTrade && isDepositsConfirmed() && walletExists() && pollNormalStartTimeMs == null; // arbitrator idles trade after deposits confirm unless overriden
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue