@@ -80,6 +80,14 @@ type FullyResolvedChannelEvent struct {
8080 ChannelPoint * wire.OutPoint
8181}
8282
83+ // FundingTimeoutEvent represents a new event where a pending-open channel has
84+ // timed out from the PoV of the funding manager because the funding tx
85+ // has not confirmed in the allotted time.
86+ type FundingTimeoutEvent struct {
87+ // ChannelPoint is the channelpoint for the newly inactive channel.
88+ ChannelPoint * wire.OutPoint
89+ }
90+
8391// New creates a new channel notifier. The ChannelNotifier gets channel
8492// events from peers and from the chain arbitrator, and dispatches them to
8593// its clients.
@@ -184,6 +192,17 @@ func (c *ChannelNotifier) NotifyFullyResolvedChannelEvent(
184192 }
185193}
186194
195+ // NotifyFundingTimeoutEvent notifies the channelEventNotifier goroutine that
196+ // a funding timeout has occurred for a certain channel point.
197+ func (c * ChannelNotifier ) NotifyFundingTimeout (chanPoint wire.OutPoint ) {
198+ // Send this event to all channel event subscribers.
199+ event := FundingTimeoutEvent {ChannelPoint : & chanPoint }
200+ if err := c .ntfnServer .SendUpdate (event ); err != nil {
201+ log .Warnf ("Unable to send funding timeout update: %v for " +
202+ "ChanPoint(%v)" , err , chanPoint )
203+ }
204+ }
205+
187206// NotifyActiveLinkEvent notifies the channelEventNotifier goroutine that a
188207// link has been added to the switch.
189208func (c * ChannelNotifier ) NotifyActiveLinkEvent (chanPoint wire.OutPoint ) {
0 commit comments