mirror of
https://github.com/retoaccess1/haveno-reto.git
synced 2024-11-09 20:53:37 +01:00
do not reprocess error on submit multisig tx w/o enough signers #1227
This commit is contained in:
parent
cae360b6c5
commit
2d0f200aa1
@ -511,6 +511,7 @@ public final class ArbitrationManager extends DisputeManager<ArbitrationDisputeL
|
||||
break;
|
||||
} catch (Exception e) {
|
||||
if (trade.isPayoutPublished()) throw new IllegalStateException("Payout tx already published for " + trade.getClass().getSimpleName() + " " + trade.getShortId());
|
||||
if (HavenoUtils.isNotEnoughSigners(e)) throw new IllegalArgumentException(e);
|
||||
log.warn("Failed to submit dispute payout tx, tradeId={}, attempt={}/{}, error={}", trade.getShortId(), i + 1, TradeProtocol.MAX_ATTEMPTS, e.getMessage());
|
||||
if (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e;
|
||||
if (trade.getXmrConnectionService().isConnected()) trade.requestSwitchToNextBestConnection(sourceConnection);
|
||||
|
@ -521,4 +521,8 @@ public class HavenoUtils {
|
||||
public static boolean isUnresponsive(Exception e) {
|
||||
return isConnectionRefused(e) || isReadTimeout(e);
|
||||
}
|
||||
|
||||
public static boolean isNotEnoughSigners(Exception e) {
|
||||
return e != null && e.getMessage().contains("Not enough signers");
|
||||
}
|
||||
}
|
||||
|
@ -1381,6 +1381,8 @@ public abstract class Trade extends XmrWalletBase implements Tradable, Model {
|
||||
wallet.submitMultisigTxHex(payoutTxHex);
|
||||
setPayoutStatePublished();
|
||||
} catch (Exception e) {
|
||||
if (isPayoutPublished()) throw new IllegalStateException("Payout tx already published for " + getClass().getSimpleName() + " " + getShortId());
|
||||
if (HavenoUtils.isNotEnoughSigners(e)) throw new IllegalArgumentException(e);
|
||||
throw new RuntimeException("Failed to submit payout tx for " + getClass().getSimpleName() + " " + getId(), e);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user