Address is a type alias

This commit is contained in:
Ethan Buchman 2018-01-06 16:05:50 -05:00
parent 3ebe3250ff
commit 67a47e6a0b

View File

@ -16,7 +16,8 @@ import (
// An address is a []byte, but hex-encoded even in JSON.
// []byte leaves us the option to change the address length.
type Address cmn.HexBytes
// Use an alias so Unmarshal methods (with ptr receivers) are available too.
type Address = cmn.HexBytes
func PubKeyFromBytes(pubKeyBytes []byte) (pubKey PubKey, err error) {
if err := wire.ReadBinaryBytes(pubKeyBytes, &pubKey); err != nil {