Skip to content

Commit

Permalink
Increased the number of attempts for the FROST roundtrip test
Browse files Browse the repository at this point in the history
With maxAttempts = 5 we have around a 3% chance that this test will not pass due
to bad luck. With maxAttempts = 20 we have 0.0001% chance of not passing.

Also, added a context to error messages printed to better distinguish test cases.
  • Loading branch information
pdyraga committed Jan 10, 2024
1 parent 8a37f80 commit cfaccb4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frost/frost_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ func TestFrostRoundtrip(t *testing.T) {
publicKey := signers[0].publicKey

isSignatureValid := false
maxAttempts := 5
maxAttempts := 20

// From [BIP-340]:
// Let k' = int(rand) mod n[13].
Expand Down Expand Up @@ -64,7 +64,8 @@ func TestFrostRoundtrip(t *testing.T) {
)
if err != nil {
fmt.Printf(
"signature verification error on attempt [%v]: [%v]\n",
"[%v] signature verification error on attempt [%v]: [%v]\n",
testName,
i,
err,
)
Expand Down

0 comments on commit cfaccb4

Please sign in to comment.