Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 9 additions & 15 deletions pkg/beacon/beacon.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,24 +182,20 @@ type node struct {
broker *emission.Emitter

// Internal data stores
genesis *v1.Genesis
genesisMu sync.RWMutex
lastEventTime time.Time
lastEventTimeMu sync.RWMutex
nodeVersion string
nodeVersionMu sync.RWMutex
peers types.Peers
finality *v1.Finality
spec *state.Spec
specMu sync.RWMutex
wallclock *ethwallclock.EthereumBeaconChain
genesis *v1.Genesis
genesisMu sync.RWMutex
nodeVersion string
nodeVersionMu sync.RWMutex
peers types.Peers
finality *v1.Finality
spec *state.Spec
specMu sync.RWMutex
wallclock *ethwallclock.EthereumBeaconChain

stat *Status

metrics *Metrics

Ready bool

hasEmittedFirstTimeHealthy bool
firstHealthyMutex sync.Mutex

Expand Down Expand Up @@ -406,8 +402,6 @@ func (n *node) bootstrap(ctx context.Context) error {
//nolint:errcheck // we dont care if this errors out since it runs indefinitely in a goroutine
go n.ensureBeaconSubscription(ctx)

n.Ready = true

go n.publishReady(ctx)

return nil
Expand Down
4 changes: 0 additions & 4 deletions pkg/beacon/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,6 @@ func (n *node) subscribeToBeaconEvents(ctx context.Context) error {
if err := provider.Events(ctx, &api.EventsOpts{
Topics: []string{topic},
Handler: func(event *v1.Event) {
n.lastEventTimeMu.Lock()
n.lastEventTime = time.Now()
n.lastEventTimeMu.Unlock()

if err := n.handleEvent(ctx, event); err != nil {
n.log.Errorf("Failed to handle event: %v", err)
}
Expand Down