mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-27 17:56:16 +02:00
multi: move active/inactive ntfns from switch to link
Since we will now wait to deliver the event after channel reestablish, notifying when the link is added to the switch will no longer be sufficient. Later, we will add receiving reestablish as an additional requirement for EligibleToForward returning true. The inactive ntfn is also moved, to ensure that we don't fire inactive notifications if no corresponding active notification was sent.
This commit is contained in:
@@ -171,12 +171,10 @@ func initSwitchWithDB(startingHeight uint32, db *channeldb.DB) (*Switch, error)
|
||||
FetchLastChannelUpdate: func(lnwire.ShortChannelID) (*lnwire.ChannelUpdate, error) {
|
||||
return nil, nil
|
||||
},
|
||||
Notifier: &mockNotifier{},
|
||||
FwdEventTicker: ticker.NewForce(DefaultFwdEventInterval),
|
||||
LogEventTicker: ticker.NewForce(DefaultLogInterval),
|
||||
AckEventTicker: ticker.NewForce(DefaultAckInterval),
|
||||
NotifyActiveChannel: func(wire.OutPoint) {},
|
||||
NotifyInactiveChannel: func(wire.OutPoint) {},
|
||||
Notifier: &mockNotifier{},
|
||||
FwdEventTicker: ticker.NewForce(DefaultFwdEventInterval),
|
||||
LogEventTicker: ticker.NewForce(DefaultLogInterval),
|
||||
AckEventTicker: ticker.NewForce(DefaultAckInterval),
|
||||
}
|
||||
|
||||
return New(cfg, startingHeight)
|
||||
|
Reference in New Issue
Block a user