Skip to content

Commit e5aae15

Browse files
committed
fix changelog and underflow
1 parent 5ec8178 commit e5aae15

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Fixed
1313

14+
- Refetch latest da height instead of da height +1 when P2P is offline [#3201](https://github.com/evstack/ev-node/pull/3201)
1415
- Fix race on startup sync. [#3162](https://github.com/evstack/ev-node/pull/3162)
1516
- Strict raft state. [#3167](https://github.com/evstack/ev-node/pull/3167)
1617
- Retry fetching the timestamp on error in da-client [#3166](https://github.com/evstack/ev-node/pull/3166)

block/internal/syncing/syncer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ func (s *Syncer) initializeState() error {
356356
// Set DA height to the maximum of the genesis start height, the state's DA height, and the cached DA height.
357357
// The cache's DaHeight() is initialized from store metadata, so it's always correct even after cache clear.
358358
// Only use cache.DaHeight() when P2P is actively syncing (headerStore has higher height than current state).
359-
daHeight := max(s.genesis.DAStartHeight, state.DAHeight-1)
359+
daHeight := max(s.genesis.DAStartHeight, min(state.DAHeight-1, 0))
360360
if s.headerStore.Height() > state.LastBlockHeight {
361361
daHeight = max(daHeight, s.cache.DaHeight())
362362
}

0 commit comments

Comments
 (0)