Update types/block.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
This commit is contained in:
William Banfield
2022-05-16 11:33:41 -04:00
committed by GitHub
co-authored by M. J. Fromberger
parent c2f543bebb
commit 331a7ceea1
+2 -4
View File
@@ -772,10 +772,8 @@ func (ecs ExtendedCommitSig) ValidateBasic() error {
// EnsureExtensions validates that a vote extensions signature is present for
// this ExtendedCommitSig.
func (ecs ExtendedCommitSig) EnsureExtension() error {
if ecs.BlockIDFlag == BlockIDFlagCommit {
if len(ecs.ExtensionSignature) == 0 {
return errors.New("vote extension signature is missing")
}
if ecs.BlockIDFlag == BlockIDFlagCommit && len(ecs.ExtensionSignature) == 0 {
return errors.New("vote extension signature is missing")
}
return nil
}