Skip to content

Commit

Permalink
core: fix condition on header verification
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Mar 25, 2021
1 parent 0fda25e commit 497448b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/headerchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ func (hc *HeaderChain) ValidateHeaderChain(chain []*types.Header, checkFreq int)
seals := make([]bool, len(chain))
if checkFreq != 0 {
// In case of checkFreq == 0 all seals are left false.
for i := 0; i < len(seals)/checkFreq; i++ {
for i := 0; i <= len(seals)/checkFreq; i++ {
index := i*checkFreq + hc.rand.Intn(checkFreq)
if index >= len(seals) {
index = len(seals) - 1
Expand Down

0 comments on commit 497448b

Please sign in to comment.