Skip to content

Commit

Permalink
invalid miner cache
Browse files Browse the repository at this point in the history
  • Loading branch information
dshulyak committed Aug 11, 2023
1 parent 3de23ea commit ac66267
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions miner/oracle.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ func (o *Oracle) ProposalEligibility(lid types.LayerID, beacon types.Beacon, non
o.mu.Lock()
defer o.mu.Unlock()

if legacy := types.GetLegacyLayer(); legacy != 0 && lid.Uint32() == legacy+1 {
o.cache = &EpochEligibility{}
}

epoch := lid.GetEpoch()
if lid <= types.GetEffectiveGenesis() {
o.log.With().Panic("eligibility should not be queried during genesis", lid, epoch)
Expand Down

0 comments on commit ac66267

Please sign in to comment.