Skip to content

Commit

Permalink
ix important issue (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
emmanuelm41 committed Jan 31, 2022
1 parent ddb8677 commit 9627b87
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 4 additions & 0 deletions chain/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ func (v Verifier) VerifyBeacon(b Beacon, pubkey kyber.Point) error {

return key.Scheme.VerifyRecovered(pubkey, msg, b.Signature)
}

func (v Verifier) IsPrevSigMeaningful() bool {
return !v.scheme.DecouplePrevSig
}
4 changes: 3 additions & 1 deletion client/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,10 @@ func (v *verifyingClient) getTrustedPreviousSignature(ctx context.Context, round
}

func (v *verifyingClient) verify(ctx context.Context, info *chain.Info, r *RandomData) (err error) {
checkPrevSignature := v.opts.strict || (v.verifier.IsPrevSigMeaningful() && r.PreviousSignature == nil)
ps := r.PreviousSignature
if v.opts.strict || r.PreviousSignature == nil {

if checkPrevSignature {
ps, err = v.getTrustedPreviousSignature(ctx, r.Round())
if err != nil {
return
Expand Down

0 comments on commit 9627b87

Please sign in to comment.