apply timeout for arbitrator to sign offer and init trade

This commit is contained in:
woodser 2024-03-22 11:41:07 -04:00
parent 10a5b55dfe
commit db12f1c2cb
5 changed files with 117 additions and 99 deletions

View file

@ -28,6 +28,7 @@ import haveno.core.offer.availability.DisputeAgentSelection;
import haveno.core.offer.messages.SignOfferRequest;
import haveno.core.offer.placeoffer.PlaceOfferModel;
import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator;
import haveno.core.trade.HavenoUtils;
import haveno.core.xmr.model.XmrAddressEntry;
import haveno.network.p2p.AckMessage;
import haveno.network.p2p.DecryptedDirectMessageListener;
@ -164,7 +165,8 @@ public class MakerSendSignOfferRequest extends Task<PlaceOfferModel> {
arbitratorNodeAddress,
arbitrator.getPubKeyRing(),
request,
listener
listener,
HavenoUtils.ARBITRATOR_ACK_TIMEOUT_SECONDS
);
}
}

View file

@ -66,6 +66,7 @@ public class HavenoUtils {
private static final String RELEASE_DATE = "01-03-2024 00:00:00"; // optionally set to release date of the network in format dd-mm-yyyy to impose temporary limits, etc. e.g. "01-03-2024 00:00:00"
public static final int RELEASE_LIMIT_DAYS = 60; // number of days to limit sell offers to max buy limit for new accounts
public static final int WARN_ON_OFFER_EXCEEDS_UNSIGNED_BUY_LIMIT_DAYS = 182; // number of days to warn if sell offer exceeds unsigned buy limit
public static final int ARBITRATOR_ACK_TIMEOUT_SECONDS = 15;
// non-configurable
public static final DecimalFormatSymbols DECIMAL_FORMAT_SYMBOLS = DecimalFormatSymbols.getInstance(Locale.US); // use the US locale as a base for all DecimalFormats (commas should be omitted from number strings)

View file

@ -23,6 +23,7 @@ import haveno.common.handlers.ResultHandler;
import haveno.common.taskrunner.TaskRunner;
import haveno.core.offer.availability.DisputeAgentSelection;
import haveno.core.support.dispute.arbitration.arbitrator.Arbitrator;
import haveno.core.trade.HavenoUtils;
import haveno.core.trade.Trade;
import haveno.core.trade.messages.InitTradeRequest;
import haveno.network.p2p.NodeAddress;
@ -144,7 +145,8 @@ public class TakerSendInitTradeRequestToArbitrator extends TradeTask {
arbitratorNodeAddress,
arbitrator.getPubKeyRing(),
arbitratorRequest,
listener
listener,
HavenoUtils.ARBITRATOR_ACK_TIMEOUT_SECONDS
);
}
}