diff --git a/privval/file.go b/privval/file.go index cefbef376..a0835cfeb 100644 --- a/privval/file.go +++ b/privval/file.go @@ -405,10 +405,11 @@ func (pv *FilePV) signVote(chainID string, vote *tmproto.Vote) error { vote.Signature = sig // Sign the vote extension, regardless of whether it's present or not - vote.ExtensionSignature, err = pv.Key.PrivKey.Sign(extSignBytes) + extSig, err := pv.Key.PrivKey.Sign(extSignBytes) if err != nil { return err } + vote.ExtensionSignature = extSig return nil } diff --git a/types/priv_validator.go b/types/priv_validator.go index cbf3896fd..29620f829 100644 --- a/types/priv_validator.go +++ b/types/priv_validator.go @@ -96,8 +96,12 @@ func (pv MockPV) SignVote(ctx context.Context, chainID string, vote *tmproto.Vot return err } vote.Signature = sig - vote.ExtensionSignature, err = pv.PrivKey.Sign(extSignBytes) - return err + extSig, err := pv.PrivKey.Sign(extSignBytes) + if err != nil { + return err + } + vote.ExtensionSignature = extSig + return nil } // Implements PrivValidator.