mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
peer: add QuitSignal to ensure peer struct adheres to lnpeer.Peer interface
This commit is contained in:
parent
1364dca5a6
commit
7f480f723c
1 changed files with 10 additions and 0 deletions
10
peer.go
10
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 {
|
||||
|
|
Loading…
Add table
Reference in a new issue