Selaa lähdekoodia

core: fix condition on header verification

Martin Holst Swende 4 vuotta sitten
vanhempi
commit
497448bf90
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      core/headerchain.go

+ 1 - 1
core/headerchain.go

@@ -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