From b208da0802797d229103ce7f264b5dcfb5f9640e Mon Sep 17 00:00:00 2001 From: Piers Powlesland Date: Sat, 2 Nov 2024 09:05:12 +0000 Subject: [PATCH] Update error formatting --- core/txpool/txpool.go | 2 +- core/txpool/validation.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/txpool/txpool.go b/core/txpool/txpool.go index 42e42cf9d2..58d36e4b0f 100644 --- a/core/txpool/txpool.go +++ b/core/txpool/txpool.go @@ -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 diff --git a/core/txpool/validation.go b/core/txpool/validation.go index 125c0b090e..5ff92d71c2 100644 --- a/core/txpool/validation.go +++ b/core/txpool/validation.go @@ -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