mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 01:43:16 +01:00
84cdcd6847
This commit moves the ChannelEdgePolicy, ChannelEdgeInfo, ChanelAuthProof and CachedEdgePolicy structs to the `channeldb/models` package.
25 lines
847 B
Go
25 lines
847 B
Go
package netann
|
|
|
|
import (
|
|
"github.com/btcsuite/btcd/wire"
|
|
"github.com/lightningnetwork/lnd/channeldb"
|
|
"github.com/lightningnetwork/lnd/channeldb/models"
|
|
)
|
|
|
|
// 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) (*models.ChannelEdgeInfo,
|
|
*models.ChannelEdgePolicy, *models.ChannelEdgePolicy, error)
|
|
}
|