Skip to content
Merged
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
2 changes: 1 addition & 1 deletion block/internal/syncing/syncer.go
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ func (s *Syncer) initializeState() error {
AppHash: stateRoot,
}
}
if state.DAHeight < s.genesis.DAStartHeight {
if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DaHeight can be 0 if the node starts from sequencer state
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

There's a typo in the comment. state.DaHeight should be state.DAHeight to match the field name in the code and improve clarity.

Suggested change
if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DaHeight can be 0 if the node starts from sequencer state
if state.DAHeight != 0 && state.DAHeight < s.genesis.DAStartHeight { // state.DAHeight can be 0 if the node starts from sequencer state

return fmt.Errorf("DA height (%d) is lower than DA start height (%d)", state.DAHeight, s.genesis.DAStartHeight)
}
s.SetLastState(state)
Expand Down
Loading