Skip to content

Commit

Permalink
change test case that should fail with s above upper limit
Browse files Browse the repository at this point in the history
Originally this test was designed to accept upper band S values sending
homestead bool variable as false to the verifySignatureValues function.
 But since we've removed homestead bool check and VerifySignatureValues
always fails for upper band S values, which is the case of this test.
For that reason test expected output needed to change.
  • Loading branch information
didaunesp committed Sep 6, 2023
1 parent 60c27c6 commit c8f5cb1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/crypto_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ func TestValidateSignatureValues(t *testing.T) {
check(false, 1, zero, one)
check(false, 1, one, zero)

// correct sig with max r,s
check(true, 0, secp256k1nMinus1, secp256k1nMinus1)
// correct sig with max r and s above upper limit
check(false, 0, secp256k1nMinus1, secp256k1nMinus1)
// correct v, combinations of incorrect r,s at upper limit
check(false, 0, secp256k1N, secp256k1nMinus1)
check(false, 0, secp256k1nMinus1, secp256k1N)
Expand Down

0 comments on commit c8f5cb1

Please sign in to comment.