multi: add htlcNotifier interface to switch and link

In this commit, a htlcNotifier interface is added to allow for easy
unit testing. Instances of the HtlcNotifier are added to the server,
switch and link.
This commit is contained in:
carla committed 2020-02-19 17:50:28 +02:00
1 parent 2074820d85
commit abf780bf03
9 files changed
+77

No files matched your search

+4
View File
@@ -272,6 +272,10 @@ type ChannelLinkConfig struct {
// NotifyInactiveChannel allows the switch to tell the ChannelNotifier
// when channels become inactive.
NotifyInactiveChannel func(wire.OutPoint)
// HtlcNotifier is an instance of a htlcNotifier which we will pipe htlc
// events through.
HtlcNotifier htlcNotifier
}
// channelLink is the service which drives a channel's commitment update