From e70031da7b8c0553a1f34b1dc907a816223f4cad Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Wed, 18 Oct 2017 21:29:14 -0700 Subject: [PATCH] routing: properly assign flags and write both edges when parsing test data --- routing/pathfind_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/routing/pathfind_test.go b/routing/pathfind_test.go index 4d447d70..78f0e86f 100644 --- a/routing/pathfind_test.go +++ b/routing/pathfind_test.go @@ -257,12 +257,14 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err ChannelPoint: fundingPoint, Capacity: btcutil.Amount(edge.Capacity), } - if err := graph.AddChannelEdge(&edgeInfo); err != nil { + err = graph.AddChannelEdge(&edgeInfo) + if err != nil && err != channeldb.ErrEdgeAlreadyExist { return nil, nil, nil, err } edgePolicy := &channeldb.ChannelEdgePolicy{ Signature: testSig, + Flags: edge.Flags, ChannelID: edge.ChannelID, LastUpdate: time.Now(), TimeLockDelta: edge.Expiry,