From 497448bf90226eb088a41d1d102ffbb6cb2d1d6f Mon Sep 17 00:00:00 2001
From: Martin Holst Swende <martin@swende.se>
Date: Thu, 25 Mar 2021 11:50:14 +0100
Subject: [PATCH] core: fix condition on header verification

---
 core/headerchain.go | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/headerchain.go b/core/headerchain.go
index dcd3644cd..9aee660eb 100644
--- a/core/headerchain.go
+++ b/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
-- 
GitLab