We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e39d009 + b01437d commit 5305854Copy full SHA for 5305854
rpcserver.go
@@ -5164,6 +5164,12 @@ func (r *rpcServer) DescribeGraph(ctx context.Context,
5164
func marshalDbEdge(edgeInfo *channeldb.ChannelEdgeInfo,
5165
c1, c2 *channeldb.ChannelEdgePolicy) *lnrpc.ChannelEdge {
5166
5167
+ // Make sure the policies match the node they belong to. c1 should point
5168
+ // to the policy for NodeKey1, and c2 for NodeKey2.
5169
+ if c1.ChannelFlags&lnwire.ChanUpdateDirection == 1 {
5170
+ c2, c1 = c1, c2
5171
+ }
5172
+
5173
// Order the edges by increasing pubkey.
5174
if bytes.Compare(edgeInfo.NodeKey2Bytes[:],
5175
edgeInfo.NodeKey1Bytes[:]) < 0 {
0 commit comments