mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-22 20:19:21 +00:00
do not reprocess error on submit multisig tx w/o enough signers #1227
This commit is contained in:
parent
cae360b6c5
commit
2d0f200aa1
3 changed files with 7 additions and 0 deletions
|
@ -511,6 +511,7 @@ public final class ArbitrationManager extends DisputeManager<ArbitrationDisputeL
|
||||||
break;
|
break;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
if (trade.isPayoutPublished()) throw new IllegalStateException("Payout tx already published for " + trade.getClass().getSimpleName() + " " + trade.getShortId());
|
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());
|
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 (i == TradeProtocol.MAX_ATTEMPTS - 1) throw e;
|
||||||
if (trade.getXmrConnectionService().isConnected()) trade.requestSwitchToNextBestConnection(sourceConnection);
|
if (trade.getXmrConnectionService().isConnected()) trade.requestSwitchToNextBestConnection(sourceConnection);
|
||||||
|
|
|
@ -521,4 +521,8 @@ public class HavenoUtils {
|
||||||
public static boolean isUnresponsive(Exception e) {
|
public static boolean isUnresponsive(Exception e) {
|
||||||
return isConnectionRefused(e) || isReadTimeout(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);
|
wallet.submitMultisigTxHex(payoutTxHex);
|
||||||
setPayoutStatePublished();
|
setPayoutStatePublished();
|
||||||
} catch (Exception e) {
|
} 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);
|
throw new RuntimeException("Failed to submit payout tx for " + getClass().getSimpleName() + " " + getId(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue