Browse Source

Explicitly ensure length > 0 to sign vote extension

Signed-off-by: Thane Thomson <connect@thanethomson.com>
thane/7655-vote-extensions
Thane Thomson 3 years ago
parent
commit
25a7312e35
No known key found for this signature in database GPG Key ID: 19811391D676EE45
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      privval/file.go

+ 1
- 1
privval/file.go View File

@ -404,7 +404,7 @@ func (pv *FilePV) signVote(chainID string, vote *tmproto.Vote) error {
vote.Signature = sig
// Sign the vote extension, if any
if vote.Extension != nil {
if len(vote.Extension) > 0 {
vote.ExtensionSignature, err = pv.Key.PrivKey.Sign(vote.Extension)
if err != nil {
return err


Loading…
Cancel
Save