mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 06:34:27 +01:00
multi: extract address source into interface
As a preparation to have the method for querying the addresses of a node separate from the channel state, we extract that method out into its own interface.
This commit is contained in:
@@ -6469,7 +6469,7 @@ func (r *rpcServer) ExportChannelBackup(ctx context.Context,
|
||||
// the database. If this channel has been closed, or the outpoint is
|
||||
// unknown, then we'll return an error
|
||||
unpackedBackup, err := chanbackup.FetchBackupForChan(
|
||||
chanPoint, r.server.chanStateDB,
|
||||
chanPoint, r.server.chanStateDB, r.server.addrSource,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -6639,7 +6639,7 @@ func (r *rpcServer) ExportAllChannelBackups(ctx context.Context,
|
||||
// First, we'll attempt to read back ups for ALL currently opened
|
||||
// channels from disk.
|
||||
allUnpackedBackups, err := chanbackup.FetchStaticChanBackups(
|
||||
r.server.chanStateDB,
|
||||
r.server.chanStateDB, r.server.addrSource,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("unable to fetch all static chan "+
|
||||
@@ -6766,7 +6766,7 @@ func (r *rpcServer) SubscribeChannelBackups(req *lnrpc.ChannelBackupSubscription
|
||||
// we'll obtains the current set of single channel
|
||||
// backups from disk.
|
||||
chanBackups, err := chanbackup.FetchStaticChanBackups(
|
||||
r.server.chanStateDB,
|
||||
r.server.chanStateDB, r.server.addrSource,
|
||||
)
|
||||
if err != nil {
|
||||
return fmt.Errorf("unable to fetch all "+
|
||||
|
||||
Reference in New Issue
Block a user