Skip to content

Commit

Permalink
fix(code standards): remove a few lines in manager start (#866)
Browse files Browse the repository at this point in the history
  • Loading branch information
danwt authored May 15, 2024
1 parent bd3c97d commit c66afbb
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions block/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,19 +127,14 @@ func NewManager(
func (m *Manager) Start(ctx context.Context) error {
m.logger.Info("Starting the block manager")

// Check if proposer key matches to the one in the settlement layer
var isSequencer bool
slProposerKey := m.SLClient.GetProposer().PublicKey.Bytes()
localProposerKey, err := m.ProposerKey.GetPublic().Raw()
if err != nil {
return fmt.Errorf("get local node public key: %w", err)
}
if bytes.Equal(slProposerKey, localProposerKey) {
m.logger.Info("Starting in sequencer mode")
isSequencer = true
} else {
m.logger.Info("Starting in non-sequencer mode")
}

isSequencer := bytes.Equal(slProposerKey, localProposerKey)
m.logger.Info("Starting block manager", "isSequencer", isSequencer)

// Check if InitChain flow is needed
if m.LastState.IsGenesis() {
Expand Down

0 comments on commit c66afbb

Please sign in to comment.