Update error formatting

This commit is contained in:
Piers Powlesland 2024-11-02 09:05:12 +00:00
parent e44cfeeaa2
commit b208da0802
2 changed files with 2 additions and 2 deletions

View file

@ -341,7 +341,7 @@ func (p *TxPool) Add(txs []*types.Transaction, local bool, sync bool) []error {
for i, split := range splits {
// If the transaction was rejected by all subpools, mark it unsupported
if split == -1 {
errs[i] = fmt.Errorf("%w (type %d)", core.ErrTxTypeNotSupported, txs[i].Type())
errs[i] = fmt.Errorf("%w: received type %d", core.ErrTxTypeNotSupported, txs[i].Type())
continue
}
// Find which subpool handled it and pull in the corresponding error

View file

@ -99,7 +99,7 @@ func ValidateTransaction(tx *types.Transaction, head *types.Header, signer types
}
// Make sure the transaction is signed properly
if _, err := types.Sender(signer, tx); err != nil {
return fmt.Errorf("%w: %w", ErrInvalidSender, err)
return fmt.Errorf("%w: %v", ErrInvalidSender, err)
}
// Ensure the transaction has more gas than the bare minimum needed to cover
// the transaction metadata