Skip to content

Commit

Permalink
syncing after init chain
Browse files Browse the repository at this point in the history
  • Loading branch information
srene committed Apr 12, 2024
1 parent 96aff88 commit 033d5a9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,6 @@ func NewManager(
func (m *Manager) Start(ctx context.Context, isAggregator bool) error {
m.logger.Info("Starting the block manager")

err := m.syncBlockManager(ctx)
if err != nil {
err = fmt.Errorf("failed to sync block manager: %w", err)
return err
}

if isAggregator {
//make sure local signing key is the registered on the hub
slProposerKey := m.settlementClient.GetProposer().PublicKey.Bytes()
Expand All @@ -158,6 +152,12 @@ func (m *Manager) Start(ctx context.Context, isAggregator bool) error {
}
}

err := m.syncBlockManager(ctx)
if err != nil {
err = fmt.Errorf("failed to sync block manager: %w", err)
return err
}

if isAggregator {
go m.ProduceBlockLoop(ctx)
go m.SubmitLoop(ctx)
Expand Down

0 comments on commit 033d5a9

Please sign in to comment.