extend sign offer timeouts

This commit is contained in:
woodser 2024-05-22 18:14:20 -04:00
parent 48f05cca8c
commit a1e554473a
2 changed files with 6 additions and 5 deletions

View File

@ -80,6 +80,7 @@ public class MakerReserveOfferFunds extends Task<PlaceOfferModel> {
} 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<PlaceOfferModel> {
}
}
// reset protocol timeout
model.getProtocol().startTimeoutTimer();
// collect reserved key images
List<String> reservedKeyImages = new ArrayList<String>();
for (MoneroOutput input : reserveTx.getInputs()) reservedKeyImages.add(input.getKeyImage().getHex());
@ -98,11 +102,8 @@ public class MakerReserveOfferFunds extends Task<PlaceOfferModel> {
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" +

View File

@ -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;