Skip to content

Commit

Permalink
simplified waiting for sidecar availability
Browse files Browse the repository at this point in the history
  • Loading branch information
abi87 committed Nov 11, 2024
1 parent 86e901f commit b26afa8
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions mod/beacon/blockchain/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import (

"github.com/berachain/beacon-kit/mod/primitives/pkg/async"
"github.com/berachain/beacon-kit/mod/primitives/pkg/transition"
"golang.org/x/sync/errgroup"
)

// ProcessGenesisData processes the genesis state and initializes the beacon
Expand Down Expand Up @@ -66,16 +65,7 @@ func (s *Service[
return nil, err
}

// To complete block finalization, we wait for the associated blob
// to be persisted and verify it's available. Once that is done we
// complete block finalization.
g, gCtx := errgroup.WithContext(ctx)
g.Go(func() error {
return s.verifyFinalBlobAvailability(gCtx, beaconBlk)
})

// Wait for the sidecar to be finalized and its availability checked
if err = g.Wait(); err != nil {
if err = s.verifyFinalBlobAvailability(ctx, beaconBlk); err != nil {
return nil, err
}

Expand Down

0 comments on commit b26afa8

Please sign in to comment.