mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-10-04 20:33:18 +02:00
lndc: use hex encoding method .String() method
This commit is contained in:
@@ -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...
|
||||||
|
Reference in New Issue
Block a user