ethapi: wrap transaction submission errors with txValidationError

This commit is contained in:
souhailaS 2026-02-18 17:31:41 +01:00
parent 01fe1d716c
commit e220c51447
No known key found for this signature in database
GPG key ID: 012B91523BA38D4E

View file

@ -1553,7 +1553,7 @@ func SubmitTransaction(ctx context.Context, b Backend, tx *types.Transaction) (c
return common.Hash{}, errors.New("only replay-protected (EIP-155) transactions allowed over RPC")
}
if err := b.SendTx(ctx, tx); err != nil {
return common.Hash{}, err
return common.Hash{}, txValidationError(err)
}
// Print a log with full tx details for manual investigations and interventions
head := b.CurrentBlock()