routing: only write a single edge as edges in test data are now directional
This commit is contained in:
parent
86283b0d06
commit
f5881ad3df
@ -274,18 +274,6 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
|||||||
FeeBaseMSat: lnwire.MilliSatoshi(edge.FeeBaseMsat),
|
FeeBaseMSat: lnwire.MilliSatoshi(edge.FeeBaseMsat),
|
||||||
FeeProportionalMillionths: lnwire.MilliSatoshi(edge.FeeRate),
|
FeeProportionalMillionths: lnwire.MilliSatoshi(edge.FeeRate),
|
||||||
}
|
}
|
||||||
|
|
||||||
// As the graph itself is directed, we need to insert two edges
|
|
||||||
// into the graph: one from node1->node2 and one from
|
|
||||||
// node2->node1. A flag of 0 indicates this is the routing
|
|
||||||
// policy for the first node, and a flag of 1 indicates its the
|
|
||||||
// information for the second node.
|
|
||||||
edgePolicy.Flags = 0
|
|
||||||
if err := graph.UpdateEdgePolicy(edgePolicy); err != nil {
|
|
||||||
return nil, nil, nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
edgePolicy.Flags = 1
|
|
||||||
if err := graph.UpdateEdgePolicy(edgePolicy); err != nil {
|
if err := graph.UpdateEdgePolicy(edgePolicy); err != nil {
|
||||||
return nil, nil, nil, err
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user