From 331a7ceea1a9e61842d1d547c7f7e9cb716fa624 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Mon, 16 May 2022 11:33:41 -0400 Subject: [PATCH] Update types/block.go Co-authored-by: M. J. Fromberger --- types/block.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/types/block.go b/types/block.go index ab79d59ff..00a28d1f8 100644 --- a/types/block.go +++ b/types/block.go @@ -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 }