repeat wallet attempts after 2s

This commit is contained in:
woodser 2024-05-06 11:45:58 -04:00
parent 4761b71105
commit b179203dd2
2 changed files with 3 additions and 2 deletions

View File

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

View File

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