Skip to content

Commit

Permalink
fix: return checksum of SignRequestId
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Dec 14, 2023
1 parent b90f63a commit f39c8f0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions types/vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,7 @@ func VoteExtensionRequestID(ext *tmproto.VoteExtension, height int64, round int3

if ext.XSignRequestId != nil && ext.XSignRequestId.Size() > 0 {
if ext.Type == tmproto.VoteExtensionType_THRESHOLD_RECOVER_RAW {
// TODO to avoid blind signing, we should have crypto.Checksum(signRequestID) here
buf := make([]byte, 32)
// this will ensure sign request ID has exactly 32 bytes
copy(buf, ext.GetSignRequestId())
return buf, nil
return crypto.Checksum(ext.GetSignRequestId()), nil
}
return nil, ErrVoteExtensionTypeWrongForRequestID
}
Expand Down

0 comments on commit f39c8f0

Please sign in to comment.