Skip to content

Commit

Permalink
fix(nodebuilder/header): header metrics initialisation now moved to s…
Browse files Browse the repository at this point in the history
…tore construction due to dep bump
  • Loading branch information
renaynay committed Dec 23, 2023
1 parent da07fd3 commit 78b8557
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
14 changes: 6 additions & 8 deletions nodebuilder/header/constructors.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,14 @@ func newInitStore[H libhead.Header[H]](
ds datastore.Batching,
ex libhead.Exchange[H],
) (libhead.Store[H], error) {
s, err := store.NewStore[H](ds, store.WithParams(cfg.Store))
if err != nil {
return nil, err
opts := []store.Option{store.WithParams(cfg.Store)}
if MetricsEnabled {
opts = append(opts, store.WithMetrics())
}

if MetricsEnabled {
err = libhead.WithMetrics[H](s)
if err != nil {
return nil, err
}
s, err := store.NewStore[H](ds, opts...)
if err != nil {
return nil, err
}

trustedHash, err := cfg.trustedHash(net)
Expand Down
3 changes: 2 additions & 1 deletion share/eds/byzantine/byzantine.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ import (
"context"
"fmt"

"github.com/ipfs/boxo/blockservice"

"github.com/celestiaorg/celestia-app/pkg/da"
"github.com/celestiaorg/rsmt2d"
"github.com/ipfs/boxo/blockservice"

"github.com/celestiaorg/celestia-node/share/ipld"
)
Expand Down

0 comments on commit 78b8557

Please sign in to comment.