Skip to content

Commit 9f08be2

Browse files
committed
updates
1 parent e7109de commit 9f08be2

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

block/internal/cache/generic_cache.go

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,8 @@ func (c *Cache[T]) setDAIncluded(hash string, daHeight uint64, blockHeight uint6
9898

9999
// Update max DA height if necessary
100100
current := c.maxDAHeight.Load()
101-
if daHeight <= current {
102-
return
103-
}
104-
105-
if c.maxDAHeight.CompareAndSwap(current, daHeight) {
106-
return
101+
if daHeight >= current {
102+
_ = c.maxDAHeight.CompareAndSwap(current, daHeight)
107103
}
108104
}
109105

0 commit comments

Comments
 (0)