Skip to content

Commit ea26daf

Browse files
committed
fix(tx): handle ConwayMempoolFailure for spent inputs
Extend error handling in transaction resubmission to recognize '(ConwayMempoolFailure "All inputs are spent.' as an indicator that inputs are already spent, in addition to the existing BadInputsUTxO check.
1 parent 8bc5fcb commit ea26daf

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

cardano_clusterlib/transaction_group.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,12 @@ def submit_tx(
15181518
self.submit_tx_bare(tx_file)
15191519
except exceptions.CLIError as exc:
15201520
# Check if resubmitting failed because an input UTxO was already spent
1521-
if "(BadInputsUTxO" not in str(exc):
1521+
exc_str = str(exc)
1522+
inputs_spent = (
1523+
'(ConwayMempoolFailure "All inputs are spent.' in exc_str
1524+
or "(BadInputsUTxO" in exc_str
1525+
)
1526+
if not inputs_spent:
15221527
raise
15231528
err = err or exc
15241529
# If here, the TX is likely still in mempool and we need to wait

0 commit comments

Comments
 (0)