Skip to content

Commit

Permalink
fix(verifiedcar): move interface to top
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahhoward committed May 25, 2023
1 parent 77269a0 commit 978f197
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/verifiedcar/verifiedcar.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ var (
ErrMissingBlock = errors.New("missing block in CAR")
)

type BlockReader interface {
Next() (blocks.Block, error)
}

var protoChooser = dagpb.AddSupportToChooser(basicnode.Chooser)

type Config struct {
Expand Down Expand Up @@ -80,10 +84,6 @@ func (cfg Config) VerifyCar(ctx context.Context, rdr io.Reader, lsys linking.Lin
return cfg.VerifyBlockStream(ctx, cbr, lsys)
}

type BlockReader interface {
Next() (blocks.Block, error)
}

func (cfg Config) VerifyBlockStream(ctx context.Context, cbr BlockReader, lsys linking.LinkSystem) (uint64, uint64, error) {

sel, err := selector.CompileSelector(cfg.Selector)
Expand Down

0 comments on commit 978f197

Please sign in to comment.