From 90cdc9da8f60dd94d99d61fd9e86a7ffd39b3b1b Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 15 Aug 2018 21:43:33 -0700 Subject: [PATCH] channeldb: add String() method for EdgePoint In this commit we fix a minor logging artifact. After the switch to EdgePoint, the FilteredChainView implementations will try to log the struct directly, as prior they would have an outpoint object. We restore this behavior by adding a String() method to EdgePoint which will simply proxy through to the outpoint so we can log that directly. --- channeldb/graph.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/channeldb/graph.go b/channeldb/graph.go index d9860006..cfe00f42 100644 --- a/channeldb/graph.go +++ b/channeldb/graph.go @@ -2488,6 +2488,12 @@ type EdgePoint struct { OutPoint wire.OutPoint } +// String returns a human readable version of the target EdgePoint. We return +// the outpoint directly as it is enough to uniquely identify the edge point. +func (e *EdgePoint) String() string { + return e.OutPoint.String() +} + // ChannelView returns the verifiable edge information for each active channel // within the known channel graph. The set of UTXO's (along with their scripts) // returned are the ones that need to be watched on chain to detect channel