Skip to content

Commit

Permalink
fix: set lock for PruningHeight
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jul 20, 2024
1 parent 3f04b2a commit e67fe7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,9 @@ func (s *store) pruneBlock(blockHeight uint32) (bool, error) {
}

func (s *store) PruningHeight() uint32 {
s.lk.RLock()
defer s.lk.RUnlock()

cert := s.lastCertificate()
if cert == nil {
return 0
Expand Down

0 comments on commit e67fe7a

Please sign in to comment.