diff --git a/cmd/devp2p/internal/ethtest/transaction.go b/cmd/devp2p/internal/ethtest/transaction.go index 8ce26f3e1a..855e799b4f 100644 --- a/cmd/devp2p/internal/ethtest/transaction.go +++ b/cmd/devp2p/internal/ethtest/transaction.go @@ -155,7 +155,11 @@ func (s *Suite) sendInvalidTxs(t *utesting.T, txs []*types.Transaction) error { switch msg := msg.(type) { case *eth.TransactionsPacket: - for _, tx := range txs { + received, err := msg.Items() + if err != nil { + return fmt.Errorf("failed to decode received transactions: %w", err) + } + for _, tx := range received { if _, ok := invalids[tx.Hash()]; ok { return fmt.Errorf("received bad tx: %s", tx.Hash()) }