From a1e554473a5249b0d86b098d8ac6b7454687a275 Mon Sep 17 00:00:00 2001 From: woodser Date: Wed, 22 May 2024 18:14:20 -0400 Subject: [PATCH] extend sign offer timeouts --- .../offer/placeoffer/tasks/MakerReserveOfferFunds.java | 9 +++++---- core/src/main/java/haveno/core/trade/HavenoUtils.java | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java b/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java index e0fd1a7bd7..5e168edcf4 100644 --- a/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java +++ b/core/src/main/java/haveno/core/offer/placeoffer/tasks/MakerReserveOfferFunds.java @@ -80,6 +80,7 @@ public class MakerReserveOfferFunds extends Task { } catch (Exception e) { log.warn("Error creating reserve tx, attempt={}/{}, offerId={}, error={}", i + 1, TradeProtocol.MAX_ATTEMPTS, openOffer.getShortId(), e.getMessage()); if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e; + model.getProtocol().startTimeoutTimer(); // reset protocol timeout HavenoUtils.waitFor(TradeProtocol.REPROCESS_DELAY_MS); // wait before retrying } @@ -89,6 +90,9 @@ public class MakerReserveOfferFunds extends Task { } } + // reset protocol timeout + model.getProtocol().startTimeoutTimer(); + // collect reserved key images List reservedKeyImages = new ArrayList(); for (MoneroOutput input : reserveTx.getInputs()) reservedKeyImages.add(input.getKeyImage().getHex()); @@ -98,11 +102,8 @@ public class MakerReserveOfferFunds extends Task { openOffer.setReserveTxHex(reserveTx.getFullHex()); openOffer.setReserveTxKey(reserveTx.getKey()); offer.getOfferPayload().setReserveTxKeyImages(reservedKeyImages); + model.setReserveTx(reserveTx); } - - // reset protocol timeout - model.getProtocol().startTimeoutTimer(); - model.setReserveTx(reserveTx); complete(); } catch (Throwable t) { offer.setErrorMessage("An error occurred.\n" + diff --git a/core/src/main/java/haveno/core/trade/HavenoUtils.java b/core/src/main/java/haveno/core/trade/HavenoUtils.java index 07ebeb593f..04cc22a89d 100644 --- a/core/src/main/java/haveno/core/trade/HavenoUtils.java +++ b/core/src/main/java/haveno/core/trade/HavenoUtils.java @@ -68,7 +68,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 = 30; + public static final int ARBITRATOR_ACK_TIMEOUT_SECONDS = 60; // configure fees public static final boolean ARBITRATOR_ASSIGNS_TRADE_FEE_ADDRESS = true;