From 4a14067cd1af2a81108d3da0baf473ddff61f3aa Mon Sep 17 00:00:00 2001 From: Andrew Davis <1709934+Savid@users.noreply.github.com> Date: Tue, 12 Mar 2024 14:10:23 +1000 Subject: [PATCH] feat(mimicry): return errro when sidecar is missing --- pkg/mimicry/p2p/execution/event_transaction.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/mimicry/p2p/execution/event_transaction.go b/pkg/mimicry/p2p/execution/event_transaction.go index 5a1ff41a..4c0aa86d 100644 --- a/pkg/mimicry/p2p/execution/event_transaction.go +++ b/pkg/mimicry/p2p/execution/event_transaction.go @@ -10,6 +10,7 @@ import ( "github.com/ethereum/go-ethereum/core/types" "github.com/ethpandaops/xatu/pkg/proto/xatu" "github.com/jellydator/ttlcache/v3" + "github.com/pkg/errors" "github.com/sirupsen/logrus" "google.golang.org/protobuf/types/known/timestamppb" "google.golang.org/protobuf/types/known/wrapperspb" @@ -112,7 +113,7 @@ func (p *Peer) getTransactionData(ctx context.Context, event *types.Transaction, sidecarsEmptySize += ethereum.CountConsecutiveEmptyBytes(sidecars, 4) } } else { - p.log.WithField("versioned hash", event.Hash().String()).WithField("transaction", event.Hash().String()).Warn("no sidecars found for a type 3 transaction") + return nil, errors.Errorf("no sidecars found for a type 3 transaction %s", event.Hash().String()) } extra.BlobSidecarsSize = fmt.Sprint(sidecarsSize)