routing: add a String() method to the vertex type

This commit is contained in:
Olaoluwa Osuntokun 2017-10-10 19:38:50 -07:00
parent 63838f5764
commit 7ba6b7fa09
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -273,6 +273,12 @@ func newVertex(pub *btcec.PublicKey) vertex {
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
// directional edge with the node's ID in the opposite direction.
type edgeWithPrev struct {