diff options
Diffstat (limited to 'crypto/secp256k1/secp256_test.go')
-rw-r--r-- | crypto/secp256k1/secp256_test.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crypto/secp256k1/secp256_test.go b/crypto/secp256k1/secp256_test.go index 287ab512e..f6582ecd5 100644 --- a/crypto/secp256k1/secp256_test.go +++ b/crypto/secp256k1/secp256_test.go @@ -24,6 +24,7 @@ import ( "encoding/hex" "testing" + "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/crypto/randentropy" ) @@ -35,9 +36,7 @@ func generateKeyPair() (pubkey, privkey []byte) { panic(err) } pubkey = elliptic.Marshal(S256(), key.X, key.Y) - privkey = make([]byte, 32) - readBits(privkey, key.D) - return pubkey, privkey + return pubkey, math.PaddedBigBytes(key.D, 32) } func randSig() []byte { |