routing: properly assign flags and write both edges when parsing test data
This commit is contained in:
parent
4ff66efa2b
commit
e70031da7b
@ -257,12 +257,14 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
|||||||
ChannelPoint: fundingPoint,
|
ChannelPoint: fundingPoint,
|
||||||
Capacity: btcutil.Amount(edge.Capacity),
|
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
|
return nil, nil, nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
edgePolicy := &channeldb.ChannelEdgePolicy{
|
edgePolicy := &channeldb.ChannelEdgePolicy{
|
||||||
Signature: testSig,
|
Signature: testSig,
|
||||||
|
Flags: edge.Flags,
|
||||||
ChannelID: edge.ChannelID,
|
ChannelID: edge.ChannelID,
|
||||||
LastUpdate: time.Now(),
|
LastUpdate: time.Now(),
|
||||||
TimeLockDelta: edge.Expiry,
|
TimeLockDelta: edge.Expiry,
|
||||||
|
Loading…
Reference in New Issue
Block a user