mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-01-18 21:35:24 +01:00
lntest: make sure policies are populated in AssertChannelInGraph
This commit is contained in:
parent
c97c31a70b
commit
77b2fa0271
@ -1859,6 +1859,18 @@ func (h *HarnessTest) AssertChannelInGraph(hn *node.HarnessNode,
|
||||
op, err)
|
||||
}
|
||||
|
||||
// Make sure the policies are populated, otherwise this edge
|
||||
// cannot be used for routing.
|
||||
if resp.Node1Policy == nil {
|
||||
return fmt.Errorf("channel %s has no policy1: %w",
|
||||
op, err)
|
||||
}
|
||||
|
||||
if resp.Node2Policy == nil {
|
||||
return fmt.Errorf("channel %s has no policy2: %w",
|
||||
op, err)
|
||||
}
|
||||
|
||||
edge = resp
|
||||
|
||||
return nil
|
||||
|
Loading…
Reference in New Issue
Block a user