lndc: use hex encoding method .String() method
This commit is contained in:
parent
32b8c5b848
commit
7801c940df
@ -14,6 +14,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// lnAddr...
|
// lnAddr...
|
||||||
|
// TODO(roasbeef): revamp
|
||||||
type LNAdr struct {
|
type LNAdr struct {
|
||||||
LnID [16]byte // redundant because adr contains it
|
LnID [16]byte // redundant because adr contains it
|
||||||
PubKey *btcec.PublicKey
|
PubKey *btcec.PublicKey
|
||||||
@ -35,7 +36,7 @@ func (l *LNAdr) String() string {
|
|||||||
encodedId = l.PubKey.SerializeCompressed()
|
encodedId = l.PubKey.SerializeCompressed()
|
||||||
}
|
}
|
||||||
|
|
||||||
return fmt.Sprintf("%v@%v", encodedId, l.NetAddr)
|
return fmt.Sprintf("%v@%v", hex.EncodeToString(encodedId), l.NetAddr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// newLnAddr...
|
// newLnAddr...
|
||||||
|
Loading…
Reference in New Issue
Block a user