mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-26 00:31:04 +01:00
netann/interface: defines chan status mgr interfaces
This commit is contained in:
parent
a0daf6f59f
commit
559255e6f6
1 changed files with 23 additions and 0 deletions
23
netann/interface.go
Normal file
23
netann/interface.go
Normal file
|
@ -0,0 +1,23 @@
|
|||
package netann
|
||||
|
||||
import (
|
||||
"github.com/btcsuite/btcd/wire"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
)
|
||||
|
||||
// DB abstracts the required database functionality needed by the
|
||||
// ChanStatusManager.
|
||||
type DB interface {
|
||||
// FetchAllOpenChannels returns a slice of all open channels known to
|
||||
// the daemon. This may include private or pending channels.
|
||||
FetchAllOpenChannels() ([]*channeldb.OpenChannel, error)
|
||||
}
|
||||
|
||||
// ChannelGraph abstracts the required channel graph queries used by the
|
||||
// ChanStatusManager.
|
||||
type ChannelGraph interface {
|
||||
// FetchChannelEdgesByOutpoint returns the channel edge info and most
|
||||
// recent channel edge policies for a given outpoint.
|
||||
FetchChannelEdgesByOutpoint(*wire.OutPoint) (*channeldb.ChannelEdgeInfo,
|
||||
*channeldb.ChannelEdgePolicy, *channeldb.ChannelEdgePolicy, error)
|
||||
}
|
Loading…
Add table
Reference in a new issue