mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
chanstate: use channel type in gossiper
Move the gossiper channel lookup callback to chanstate.OpenChannel. Discovery still depends on channeldb for waiting-proof persistence. This commit only removes the channeldb compatibility alias from the channel state lookup boundary.
This commit is contained in:
parent
a546c7591d
commit
7bd2447757
2 changed files with 4 additions and 2 deletions
|
|
@ -26,6 +26,7 @@ import (
|
|||
"github.com/lightningnetwork/lnd/batch"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/chanstate"
|
||||
"github.com/lightningnetwork/lnd/fn/v2"
|
||||
"github.com/lightningnetwork/lnd/graph"
|
||||
graphdb "github.com/lightningnetwork/lnd/graph/db"
|
||||
|
|
@ -384,7 +385,7 @@ type Config struct {
|
|||
// FindChannel allows the gossiper to find a channel that we're party
|
||||
// to without iterating over the entire set of open channels.
|
||||
FindChannel func(node *btcec.PublicKey, chanID lnwire.ChannelID) (
|
||||
*channeldb.OpenChannel, error)
|
||||
*chanstate.OpenChannel, error)
|
||||
|
||||
// IsStillZombieChannel returns true if the channel described by info
|
||||
// should still be considered a zombie.
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ import (
|
|||
"github.com/lightningnetwork/lnd/batch"
|
||||
"github.com/lightningnetwork/lnd/chainntnfs"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/chanstate"
|
||||
"github.com/lightningnetwork/lnd/graph"
|
||||
graphdb "github.com/lightningnetwork/lnd/graph/db"
|
||||
"github.com/lightningnetwork/lnd/graph/db/models"
|
||||
|
|
@ -889,7 +890,7 @@ func (ctx *testCtx) createChannelAnnouncement(blockHeight uint32, key1,
|
|||
}
|
||||
|
||||
func mockFindChannel(node *btcec.PublicKey, chanID lnwire.ChannelID) (
|
||||
*channeldb.OpenChannel, error) {
|
||||
*chanstate.OpenChannel, error) {
|
||||
|
||||
return nil, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue