mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 01:33:02 +01:00
channeldb: skip nil scheduler options
This is a robustness option to ensure LND doesn't crash when this function is accidentally called with `AddChannelEdge(edge, nil)`.
This commit is contained in:
parent
b45deab379
commit
ac0d29580e
@ -1023,6 +1023,10 @@ func (c *ChannelGraph) AddChannelEdge(edge *models.ChannelEdgeInfo,
|
||||
}
|
||||
|
||||
for _, f := range op {
|
||||
if f == nil {
|
||||
return fmt.Errorf("nil scheduler option was used")
|
||||
}
|
||||
|
||||
f(r)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user