Skip to content

Commit fedcb3b

Browse files
committed
idomatic getter
1 parent a24b4af commit fedcb3b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

block/internal/syncing/syncer.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ func (s *Syncer) SetLastState(state types.State) {
177177

178178
// GetDAHeight returns the current DA height
179179
func (s *Syncer) GetDAHeight() uint64 {
180-
return max(s.daHeight.Load(), s.cache.DaHeight())
180+
return s.daHeight.Load()
181181
}
182182

183183
// SetDAHeight updates the DA height
@@ -298,7 +298,7 @@ func (s *Syncer) fetchDAUntilCaughtUp() error {
298298
default:
299299
}
300300

301-
daHeight := s.GetDAHeight()
301+
daHeight := max(s.GetDAHeight(), s.cache.DaHeight())
302302

303303
events, err := s.daRetriever.RetrieveFromDA(s.ctx, daHeight)
304304
if err != nil {

0 commit comments

Comments
 (0)