diff --git a/lib/babe/verify.go b/lib/babe/verify.go index de07b62abc..671114ef2d 100644 --- a/lib/babe/verify.go +++ b/lib/babe/verify.go @@ -390,7 +390,7 @@ func (b *verifier) verifyPreRuntimeDigest(digest *types.PreRuntimeDigest) (scale authIdx = d.AuthorityIndex } - if len(b.authorities) <= int(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