Skip to content
Merged
Changes from 1 commit
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
8 changes: 8 additions & 0 deletions dot/state/epoch.go
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,10 @@ func (s *EpochState) StoreBABENextConfigData(epoch uint64, hash common.Hash, nex
// check if the header is in the database then it's been finalized and
// thus we can also set the corresponding EpochData in the database
func (s *EpochState) FinalizeBABENextEpochData(finalizedHeader *types.Header) error {
if finalizedHeader.Number == 0 {
Comment thread
EclesioMeloJunior marked this conversation as resolved.
Outdated
return nil
}

s.nextEpochDataLock.Lock()
defer s.nextEpochDataLock.Unlock()

Expand Down Expand Up @@ -597,6 +601,10 @@ func (s *EpochState) FinalizeBABENextEpochData(finalizedHeader *types.Header) er
// check if the header is in the database then it's been finalized and
// thus we can also set the corresponding NextConfigData in the database
func (s *EpochState) FinalizeBABENextConfigData(finalizedHeader *types.Header) error {
if finalizedHeader.Number == 0 {
return nil
}

s.nextConfigDataLock.Lock()
defer s.nextConfigDataLock.Unlock()

Expand Down