diff --git a/peer.go b/peer.go index 1edd7368..3ec3cce4 100644 --- a/peer.go +++ b/peer.go @@ -315,6 +315,16 @@ func (p *peer) Start() error { return nil } +// QuitSignal is a method that should return a channel which will be sent upon +// or closed once the backing peer exits. This allows callers using the +// interface to cancel any processing in the event the backing implementation +// exits. +// +// NOTE: Part of the lnpeer.Peer interface. +func (p *peer) QuitSignal() <-chan struct{} { + return p.quit +} + // loadActiveChannels creates indexes within the peer for tracking all active // channels returned by the database. func (p *peer) loadActiveChannels(chans []*channeldb.OpenChannel) error {