Skip to content

Commit

Permalink
rpcserver: save CloseTxInputs in SCB
Browse files Browse the repository at this point in the history
  • Loading branch information
starius committed Dec 31, 2023
1 parent dc8585c commit eebf352
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions rpcserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -7191,6 +7191,7 @@ func (r *rpcServer) ExportChannelBackup(ctx context.Context,
// unknown, then we'll return an error
unpackedBackup, err := chanbackup.FetchBackupForChan(
chanPoint, r.server.chanStateDB, r.server.addrSource,
chanbackup.WithCloseTxInputs(true),
)
if err != nil {
return nil, err
Expand Down Expand Up @@ -7361,6 +7362,7 @@ func (r *rpcServer) ExportAllChannelBackups(ctx context.Context,
// channels from disk.
allUnpackedBackups, err := chanbackup.FetchStaticChanBackups(
r.server.chanStateDB, r.server.addrSource,
chanbackup.WithCloseTxInputs(true),
)
if err != nil {
return nil, fmt.Errorf("unable to fetch all static chan "+
Expand Down Expand Up @@ -7490,6 +7492,7 @@ func (r *rpcServer) SubscribeChannelBackups(req *lnrpc.ChannelBackupSubscription
// backups from disk.
chanBackups, err := chanbackup.FetchStaticChanBackups(
r.server.chanStateDB, r.server.addrSource,
chanbackup.WithCloseTxInputs(true),
)
if err != nil {
return fmt.Errorf("unable to fetch all "+
Expand Down
2 changes: 2 additions & 0 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -1476,12 +1476,14 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
backupFile := chanbackup.NewMultiFile(cfg.BackupFilePath)
startingChans, err := chanbackup.FetchStaticChanBackups(
s.chanStateDB, s.addrSource,
chanbackup.WithCloseTxInputs(true),
)
if err != nil {
return nil, err
}
s.chanSubSwapper, err = chanbackup.NewSubSwapper(
startingChans, chanNotifier, s.cc.KeyRing, backupFile,
chanbackup.WithCloseTxInputs(true),
)
if err != nil {
return nil, err
Expand Down

0 comments on commit eebf352

Please sign in to comment.