mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
channeldb: fix crash when inbound policy is unset
This commit is contained in:
parent
b99157efbe
commit
ea5d43a2a8
@ -405,9 +405,12 @@ func (c *ChannelGraph) ForEachNodeChannel(tx kvdb.RTx, node route.Vertex,
|
||||
dbCallback := func(tx kvdb.RTx, e *ChannelEdgeInfo, p1,
|
||||
p2 *ChannelEdgePolicy) error {
|
||||
|
||||
cachedInPolicy := NewCachedPolicy(p2)
|
||||
cachedInPolicy.ToNodePubKey = toNodeCallback
|
||||
cachedInPolicy.ToNodeFeatures = toNodeFeatures
|
||||
var cachedInPolicy *CachedEdgePolicy
|
||||
if p2 != nil {
|
||||
cachedInPolicy = NewCachedPolicy(p2)
|
||||
cachedInPolicy.ToNodePubKey = toNodeCallback
|
||||
cachedInPolicy.ToNodeFeatures = toNodeFeatures
|
||||
}
|
||||
|
||||
directedChannel := &DirectedChannel{
|
||||
ChannelID: e.ChannelID,
|
||||
|
Loading…
Reference in New Issue
Block a user