mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-09 15:37:56 -05:00
Use the raw bytes, not the libp2p protobuf container for sepc256k1 private keys (#3445)
* use the raw bytes, not the libp2p protobuf container for sepc256k1 private keys * fix tests
This commit is contained in:
@@ -3,6 +3,7 @@ package main
|
||||
import (
|
||||
"crypto/ecdsa"
|
||||
"crypto/rand"
|
||||
"fmt"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -64,12 +65,12 @@ func TestPrivateKey_ParsesCorrectly(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
marshalledKey, err := crypto.MarshalPrivateKey(privKey)
|
||||
|
||||
pk, err := privKey.Raw()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
encodedKey := crypto.ConfigEncodeKey(marshalledKey)
|
||||
*privateKey = encodedKey
|
||||
*privateKey = fmt.Sprintf("%x", pk)
|
||||
|
||||
extractedKey := extractPrivateKey()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user