From eebf3521731019a1d3b22d57a885874d093a2cfd Mon Sep 17 00:00:00 2001 From: Boris Nagaev Date: Sun, 31 Dec 2023 16:13:27 +0100 Subject: [PATCH] rpcserver: save CloseTxInputs in SCB --- rpcserver.go | 3 +++ server.go | 2 ++ 2 files changed, 5 insertions(+) diff --git a/rpcserver.go b/rpcserver.go index 42eb09d22a..571a04a59e 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -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 @@ -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 "+ @@ -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 "+ diff --git a/server.go b/server.go index b59f873cf1..c0a3c14c3e 100644 --- a/server.go +++ b/server.go @@ -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