peer+htlcswitch: inject notification endpoint
This commit is contained in:
4 files changed
+8
No files matched your search
@@ -256,6 +256,10 @@ type ChannelLinkConfig struct {
|
|||||||
// ChannelNotifier when a channel link become inactive.
|
// ChannelNotifier when a channel link become inactive.
|
||||||
NotifyInactiveLinkEvent func(wire.OutPoint)
|
NotifyInactiveLinkEvent func(wire.OutPoint)
|
||||||
|
|
||||||
|
// NotifyChannelUpdate allows the link to tell the ChannelNotifier when
|
||||||
|
// a channel's state has been updated.
|
||||||
|
NotifyChannelUpdate func(*channeldb.OpenChannel)
|
||||||
|
|
||||||
// HtlcNotifier is an instance of a htlcNotifier which we will pipe htlc
|
// HtlcNotifier is an instance of a htlcNotifier which we will pipe htlc
|
||||||
// events through.
|
// events through.
|
||||||
HtlcNotifier htlcNotifier
|
HtlcNotifier htlcNotifier
|
||||||
|
|||||||
@@ -2241,6 +2241,7 @@ func newSingleLinkTestHarness(t *testing.T, chanAmt,
|
|||||||
MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
|
MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
|
||||||
NotifyActiveLink: func(wire.OutPoint) {},
|
NotifyActiveLink: func(wire.OutPoint) {},
|
||||||
NotifyActiveChannel: func(wire.OutPoint) {},
|
NotifyActiveChannel: func(wire.OutPoint) {},
|
||||||
|
NotifyChannelUpdate: func(*channeldb.OpenChannel) {},
|
||||||
NotifyInactiveChannel: func(wire.OutPoint) {},
|
NotifyInactiveChannel: func(wire.OutPoint) {},
|
||||||
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
||||||
HtlcNotifier: aliceSwitch.cfg.HtlcNotifier,
|
HtlcNotifier: aliceSwitch.cfg.HtlcNotifier,
|
||||||
@@ -4931,6 +4932,7 @@ func (h *persistentLinkHarness) restartLink(
|
|||||||
NotifyActiveChannel: func(wire.OutPoint) {},
|
NotifyActiveChannel: func(wire.OutPoint) {},
|
||||||
NotifyInactiveChannel: func(wire.OutPoint) {},
|
NotifyInactiveChannel: func(wire.OutPoint) {},
|
||||||
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
||||||
|
NotifyChannelUpdate: func(*channeldb.OpenChannel) {},
|
||||||
HtlcNotifier: h.hSwitch.cfg.HtlcNotifier,
|
HtlcNotifier: h.hSwitch.cfg.HtlcNotifier,
|
||||||
SyncStates: syncStates,
|
SyncStates: syncStates,
|
||||||
GetAliases: getAliases,
|
GetAliases: getAliases,
|
||||||
|
|||||||
@@ -1175,6 +1175,7 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
|
|||||||
NotifyActiveChannel: func(wire.OutPoint) {},
|
NotifyActiveChannel: func(wire.OutPoint) {},
|
||||||
NotifyInactiveChannel: func(wire.OutPoint) {},
|
NotifyInactiveChannel: func(wire.OutPoint) {},
|
||||||
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
NotifyInactiveLinkEvent: func(wire.OutPoint) {},
|
||||||
|
NotifyChannelUpdate: func(*channeldb.OpenChannel) {},
|
||||||
HtlcNotifier: server.htlcSwitch.cfg.HtlcNotifier,
|
HtlcNotifier: server.htlcSwitch.cfg.HtlcNotifier,
|
||||||
GetAliases: getAliases,
|
GetAliases: getAliases,
|
||||||
ShouldFwdExpAccountability: func() bool { return true },
|
ShouldFwdExpAccountability: func() bool { return true },
|
||||||
|
|||||||
@@ -1480,6 +1480,7 @@ func (p *Brontide) addLink(chanPoint *wire.OutPoint,
|
|||||||
NotifyActiveChannel: p.cfg.ChannelNotifier.NotifyActiveChannelEvent,
|
NotifyActiveChannel: p.cfg.ChannelNotifier.NotifyActiveChannelEvent,
|
||||||
NotifyInactiveChannel: p.cfg.ChannelNotifier.NotifyInactiveChannelEvent,
|
NotifyInactiveChannel: p.cfg.ChannelNotifier.NotifyInactiveChannelEvent,
|
||||||
NotifyInactiveLinkEvent: p.cfg.ChannelNotifier.NotifyInactiveLinkEvent,
|
NotifyInactiveLinkEvent: p.cfg.ChannelNotifier.NotifyInactiveLinkEvent,
|
||||||
|
NotifyChannelUpdate: p.cfg.ChannelNotifier.NotifyChannelUpdateEvent,
|
||||||
HtlcNotifier: p.cfg.HtlcNotifier,
|
HtlcNotifier: p.cfg.HtlcNotifier,
|
||||||
GetAliases: p.cfg.GetAliases,
|
GetAliases: p.cfg.GetAliases,
|
||||||
PreviouslySentShutdown: shutdownMsg,
|
PreviouslySentShutdown: shutdownMsg,
|
||||||
|
|||||||
Reference in new issue
Block a user