From 900024c582e9b0c0288703198a5e40bfcc24f81b Mon Sep 17 00:00:00 2001 From: Vlad <13818348+walldiss@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:52:17 +0100 Subject: [PATCH] remove unused code --- das/worker.go | 8 +------- share/availability/light/availability.go | 5 ----- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/das/worker.go b/das/worker.go index 02d2ff5992..0acd4b41a6 100644 --- a/das/worker.go +++ b/das/worker.go @@ -10,7 +10,6 @@ import ( libhead "github.com/celestiaorg/go-header" "github.com/celestiaorg/celestia-node/header" - "github.com/celestiaorg/celestia-node/share" "github.com/celestiaorg/celestia-node/share/shwap/p2p/shrex/shrexsub" ) @@ -132,12 +131,7 @@ func (w *worker) sample(ctx context.Context, timeout time.Duration, height uint6 return err } - logFn := log.Debugw - // log unexpected errors as errors - if !errors.Is(err, share.ErrNotAvailable) { - logFn = log.Errorw - } - logFn( + log.Errorw( "failed to sample header", "type", w.state.jobType, "height", h.Height(), diff --git a/share/availability/light/availability.go b/share/availability/light/availability.go index 3665711d1f..c5847131fb 100644 --- a/share/availability/light/availability.go +++ b/share/availability/light/availability.go @@ -96,7 +96,6 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header } if err := dah.ValidateBasic(); err != nil { - log.Errorw("DAH validation failed", "error", err) return err } @@ -140,10 +139,6 @@ func (la *ShareAvailability) SharesAvailable(ctx context.Context, header *header // if any of the samples failed, return an error if len(failedSamples) > 0 { - log.Errorw("availability validation failed", - "root", dah.String(), - "failed_samples", failedSamples, - ) return share.ErrNotAvailable } return nil