mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-13 12:32:48 +02:00
chanstate: use channel type in backup notifier
Move the root backup notifier adapter to chanstate.OpenChannel. The adapter still depends on channeldb for address sourcing and close type handling, but the new-channel payload it forwards into chanbackup now matches the chanstate-owned backup interfaces.
This commit is contained in:
parent
dac8a8fe53
commit
897f2ce54c
1 changed files with 2 additions and 1 deletions
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/lightningnetwork/lnd/chanbackup"
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/channelnotifier"
|
||||
"github.com/lightningnetwork/lnd/chanstate"
|
||||
)
|
||||
|
||||
// channelNotifier is an implementation of the chanbackup.ChannelNotifier
|
||||
|
|
@ -46,7 +47,7 @@ func (c *channelNotifier) SubscribeChans(ctx context.Context,
|
|||
// sendChanOpenUpdate is a closure that sends a ChannelEvent to the
|
||||
// chanUpdates channel to inform subscribers about new pending or
|
||||
// confirmed channels.
|
||||
sendChanOpenUpdate := func(newOrPendingChan *channeldb.OpenChannel) {
|
||||
sendChanOpenUpdate := func(newOrPendingChan *chanstate.OpenChannel) {
|
||||
_, nodeAddrs, err := c.addrs.AddrsForNode(
|
||||
ctx, newOrPendingChan.IdentityPub,
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue