Browse Source

Address is a type alias

pull/1782/head
Ethan Buchman 7 years ago
parent
commit
67a47e6a0b
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      pub_key.go

+ 2
- 1
pub_key.go View File

@ -16,7 +16,8 @@ import (
// An address is a []byte, but hex-encoded even in JSON. // An address is a []byte, but hex-encoded even in JSON.
// []byte leaves us the option to change the address length. // []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) { func PubKeyFromBytes(pubKeyBytes []byte) (pubKey PubKey, err error) {
if err := wire.ReadBinaryBytes(pubKeyBytes, &pubKey); err != nil { if err := wire.ReadBinaryBytes(pubKeyBytes, &pubKey); err != nil {


Loading…
Cancel
Save