add last touches to the PR
This commit is contained in:
parent
2b688a0121
commit
f8442bb46f
|
@ -265,6 +265,7 @@ func incrementAllSequenceNumbers(initSeqNums []uint64) {
|
|||
}
|
||||
}
|
||||
|
||||
// CreateTestPubKeys generates crypto.PubKeys in ascending order.
|
||||
func CreateTestPubKeys(numPubKeys int) []crypto.PubKey {
|
||||
var publicKeys []crypto.PubKey
|
||||
var buffer bytes.Buffer
|
||||
|
@ -281,12 +282,12 @@ func CreateTestPubKeys(numPubKeys int) []crypto.PubKey {
|
|||
return publicKeys
|
||||
}
|
||||
|
||||
// NewPubKeyFromHex returns a PubKey from a hex string.
|
||||
func NewPubKeyFromHex(pk string) (res crypto.PubKey) {
|
||||
pkBytes, err := hex.DecodeString(pk)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
//res, err = crypto.PubKeyFromBytes(pkBytes)
|
||||
var pkEd ed25519.PubKeyEd25519
|
||||
copy(pkEd[:], pkBytes)
|
||||
return pkEd
|
||||
|
|
Loading…
Reference in New Issue