Skip to content

Commit

Permalink
remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Oct 29, 2024
1 parent 44cbe84 commit 900024c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
8 changes: 1 addition & 7 deletions das/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand Down Expand Up @@ -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(),
Expand Down
5 changes: 0 additions & 5 deletions share/availability/light/availability.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 900024c

Please sign in to comment.