lndc: use hex encoding method .String() method

This commit is contained in:
Olaoluwa Osuntokun 2016-06-20 21:45:55 -07:00
parent 32b8c5b848
commit 7801c940df
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -14,6 +14,7 @@ import (
)
// lnAddr...
// TODO(roasbeef): revamp
type LNAdr struct {
LnID [16]byte // redundant because adr contains it
PubKey *btcec.PublicKey
@ -35,7 +36,7 @@ func (l *LNAdr) String() string {
encodedId = l.PubKey.SerializeCompressed()
}
return fmt.Sprintf("%v@%v", encodedId, l.NetAddr)
return fmt.Sprintf("%v@%v", hex.EncodeToString(encodedId), l.NetAddr)
}
// newLnAddr...