type Ed25519[Signature|PubKey] struct{[]byte} -> []byte

This commit is contained in:
Jae Kwon
2015-01-03 20:24:02 -08:00
parent f02ba63412
commit 7a8a0fefc7
11 changed files with 72 additions and 29 deletions

View File

@@ -61,7 +61,7 @@ type PrivValidator struct {
func GenPrivValidator() *PrivValidator {
privKeyBytes := CRandBytes(32)
pubKeyBytes := ed25519.MakePubKey(privKeyBytes)
pubKey := PubKeyEd25519{pubKeyBytes}
pubKey := PubKeyEd25519(pubKeyBytes)
privKey := PrivKeyEd25519{pubKeyBytes, privKeyBytes}
return &PrivValidator{
Address: pubKey.Address(),

View File

@@ -11,7 +11,7 @@ import (
func randValidator_() *Validator {
return &Validator{
Address: RandBytes(20),
PubKey: PubKeyEd25519{RandBytes(64)},
PubKey: PubKeyEd25519(RandBytes(64)),
BondHeight: uint(RandUint32()),
VotingPower: RandUint64(),
Accum: int64(RandUint64()),