routing: add a String() method to the vertex type
This commit is contained in:
parent
63838f5764
commit
7ba6b7fa09
@ -273,6 +273,12 @@ func newVertex(pub *btcec.PublicKey) vertex {
|
|||||||
return v
|
return v
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// String returns a human readable version of the vertex which is the
|
||||||
|
// hex-encoding of the serialized compressed public key.
|
||||||
|
func (v vertex) String() string {
|
||||||
|
return fmt.Sprintf("%x", v[:])
|
||||||
|
}
|
||||||
|
|
||||||
// edgeWithPrev is a helper struct used in path finding that couples an
|
// edgeWithPrev is a helper struct used in path finding that couples an
|
||||||
// directional edge with the node's ID in the opposite direction.
|
// directional edge with the node's ID in the opposite direction.
|
||||||
type edgeWithPrev struct {
|
type edgeWithPrev struct {
|
||||||
|
Loading…
Reference in New Issue
Block a user