Skip to content

Commit

Permalink
Update verify.go
Browse files Browse the repository at this point in the history
  • Loading branch information
EclesioMeloJunior authored Jun 15, 2022
1 parent cee7244 commit b9268b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/babe/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ func (b *verifier) verifyPreRuntimeDigest(digest *types.PreRuntimeDigest) (scale
authIdx = d.AuthorityIndex
}

if uint64(len(b.authorities)) < uint64(authIdx) {
if uint64(len(b.authorities)) <= uint64(authIdx) {
logger.Tracef("verifyPreRuntimeDigest invalid auth index %d, we have %d auths",
authIdx, len(b.authorities))
return nil, ErrInvalidBlockProducerIndex
Expand Down

0 comments on commit b9268b9

Please sign in to comment.