We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d2a4bc4 commit 8f69b5cCopy full SHA for 8f69b5c
crypto/secp256k1/secp256_test.go
@@ -3,9 +3,10 @@ package secp256k1
3
import (
4
"bytes"
5
"fmt"
6
- "github.com/ethereum/go-ethereum/crypto/randentropy"
7
"log"
8
"testing"
+
9
+ "github.com/ethereum/go-ethereum/crypto/randentropy"
10
)
11
12
const TESTS = 10000 // how many tests
@@ -227,3 +228,11 @@ func Test_Secp256_06b(t *testing.T) {
227
228
fmt.Printf("ERROR: Accepted signature for %v of %v random messages\n", fail_count, TESTS)
229
}
230
231
232
+func TestInvalidKey(t *testing.T) {
233
+ p1 := make([]byte, 32)
234
+ err := VerifySeckeyValidity(p1)
235
+ if err == nil {
236
+ t.Errorf("pvk %x varify sec key should have returned error", p1)
237
+ }
238
+}
0 commit comments