Skip to content

Commit

Permalink
Merge pull request #10 from ethpandaops/fix/network-name
Browse files Browse the repository at this point in the history
refactor: Update name assignment to use DisplayName() method
  • Loading branch information
mattevans authored Jan 15, 2025
2 parents f2c2a05 + 06c4beb commit 9f8ffbc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cmd/sentry/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,10 @@ func newContributoor(c *cli.Context) (*contributoor, error) {
return nil, err
}

name := fmt.Sprintf("%s_contributoor", strings.ToLower(cfg.NetworkName.String()))

return &contributoor{
log: log.WithField("module", "contributoor"),
config: cfg,
name: name,
name: strings.ToLower(cfg.NetworkName.DisplayName()),
}, nil
}

Expand Down
7 changes: 7 additions & 0 deletions pkg/ethereum/beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,13 @@ func (b *BeaconNode) startServices(ctx context.Context, errs chan error) error {
b.metadataSvc.OnReady(ctx, func(ctx context.Context) error {
b.log.WithField("service", b.metadataSvc.Name()).Info("Service is ready")

hashed, err := b.metadataSvc.NodeIDHash()
if err != nil {
return err
}

b.log.WithField("node_id", hashed).Info("Beacon node ID hash")

return nil
})

Expand Down

0 comments on commit 9f8ffbc

Please sign in to comment.