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:
Conner Fromknecht committed 2019-09-19 12:46:44 -07:00
1 parent 1d41d4d666
commit 6dca07577d
7 files changed
+28 -21

No files matched your search

+2
View File
@@ -1122,6 +1122,8 @@ func (h *hopNetwork) createChannelLink(server, peer *mockServer,
OutgoingCltvRejectDelta: 3,
MaxOutgoingCltvExpiry: DefaultMaxOutgoingCltvExpiry,
MaxFeeAllocation: DefaultMaxLinkFeeAllocation,
NotifyActiveChannel: func(wire.OutPoint) {},
NotifyInactiveChannel: func(wire.OutPoint) {},
},
channel,
)