Skip to content

Commit 9054c54

Browse files
authored
Merge pull request #327 from input-output-hk/handle_10.6.0_spent_error
fix(tx): handle ConwayMempoolFailure for spent inputs
2 parents 0c1eadf + ea26daf commit 9054c54

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)