privval: migrate to protobuf (#4985)

This commit is contained in:
Marko
2020-06-11 11:54:02 +02:00
committed by GitHub
parent 31a361d119
commit f6243d8b9e
49 changed files with 3215 additions and 642 deletions

View File

@@ -108,13 +108,15 @@ func makeVote(header *types.Header, valset *types.ValidatorSet,
Type: tmproto.PrecommitType,
BlockID: blockID,
}
v := vote.ToProto()
// Sign it
signBytes := vote.SignBytes(header.ChainID)
// TODO Consider reworking makeVote API to return an error
signBytes := types.VoteSignBytes(header.ChainID, v)
sig, err := key.Sign(signBytes)
if err != nil {
panic(err)
}
vote.Signature = sig
return vote