From b179203dd289e4232806a91939087e3fdb567368 Mon Sep 17 00:00:00 2001 From: woodser Date: Mon, 6 May 2024 11:45:58 -0400 Subject: [PATCH] repeat wallet attempts after 2s --- core/src/main/java/haveno/core/offer/OpenOfferManager.java | 3 ++- .../main/java/haveno/core/trade/protocol/TradeProtocol.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/haveno/core/offer/OpenOfferManager.java b/core/src/main/java/haveno/core/offer/OpenOfferManager.java index ffa2a41e29..2301dc9f46 100644 --- a/core/src/main/java/haveno/core/offer/OpenOfferManager.java +++ b/core/src/main/java/haveno/core/offer/OpenOfferManager.java @@ -912,7 +912,8 @@ public class OpenOfferManager implements PeerManager.Listener, DecryptedDirectMe // on error, create split output tx if not already created if (openOffer.getSplitOutputTxHash() == null) { int offerSubaddress = xmrWalletService.getOrCreateAddressEntry(openOffer.getId(), XmrAddressEntry.Context.OFFER_FUNDING).getSubaddressIndex(); - log.warn("Splitting new output because spending scheduled output(s) failed for offer {}. Offer funding subadress={}", openOffer.getId(), offerSubaddress); + BigInteger balance = xmrWalletService.getBalanceForSubaddress(offerSubaddress); + log.warn("Splitting new output because spending scheduled output(s) failed, offerId={}, offerSubaddress={}, hasBalance={}", openOffer.getId(), offerSubaddress, balance.compareTo(BigInteger.ZERO) > 0); splitOrSchedule(openOffers, openOffer, amountNeeded); resultHandler.handleResult(null); } else { diff --git a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java index 24617ecc45..1dcb9ade73 100644 --- a/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java +++ b/core/src/main/java/haveno/core/trade/protocol/TradeProtocol.java @@ -97,7 +97,7 @@ public abstract class TradeProtocol implements DecryptedDirectMessageListener, D public static final int TRADE_STEP_TIMEOUT_SECONDS = Config.baseCurrencyNetwork().isTestnet() ? 60 : 180; private static final String TIMEOUT_REACHED = "Timeout reached."; public static final int MAX_ATTEMPTS = 5; // max attempts to create txs and other wallet functions - public static final long REPROCESS_DELAY_MS = 5000; + public static final long REPROCESS_DELAY_MS = 2000; protected final ProcessModel processModel; protected final Trade trade;