(t *testing.T)
| 91 | } |
| 92 | |
| 93 | func TestGetThePubKeyNonce(t *testing.T) { |
| 94 | Convey("translate key error", t, func() { |
| 95 | publicKey, _ := ParsePubKey([]byte{ |
| 96 | 0x02, |
| 97 | 0xc1, 0xdb, 0x96, 0xf2, 0xba, 0x7e, 0x1c, 0xb4, |
| 98 | 0xe9, 0x82, 0x2d, 0x12, 0xde, 0x0f, 0x63, 0xfb, |
| 99 | 0x66, 0x6f, 0xeb, 0x82, 0x8c, 0x7f, 0x50, 0x9e, |
| 100 | 0x81, 0xfa, 0xb9, 0xbd, 0x7a, 0x34, 0x03, 0x9c, |
| 101 | }) |
| 102 | nonce := GetPubKeyNonce(publicKey, 256, 1*time.Second, nil) |
| 103 | |
| 104 | log.Infof("nonce: %v", nonce) |
| 105 | // sometimes nonce difficulty can be little bit higher than expected |
| 106 | So(nonce.Difficulty, ShouldBeLessThanOrEqualTo, 40) |
| 107 | }) |
| 108 | } |
| 109 | |
| 110 | func TestPubKey(t *testing.T) { |
| 111 | pubKeyTests := []struct { |
nothing calls this directly
no test coverage detected