add check for blockid flag is commit

This commit is contained in:
William Banfield
2022-05-17 10:40:36 -04:00
parent ff7955470a
commit 42b9c99c93
+1 -1
View File
@@ -466,7 +466,7 @@ func buildExtendedCommitInfo(ec *types.ExtendedCommit, store Store, initialHeigh
}
var ext []byte
if ap.VoteExtensionsEnabled(ec.Height) {
if ap.VoteExtensionsEnabled(ec.Height) && ecs.BlockIDFlag == types.BlockIDFlagCommit {
if err := ecs.EnsureExtension(); err != nil {
panic(fmt.Errorf("commit at height %d received with missing vote extensions data", ec.Height))
}