lnd+chanbackup: add lnd config flag
In this commit, we add the --no-backup-archive with a default as false. When set to true then previous channel backup file will not be archived but replaced. We also modify TestUpdateAndSwap test to make sure the new behaviour works as expected.
This commit is contained in:
5 files changed
+119
-18
No files matched your search
@@ -1648,7 +1648,9 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
||||
chanNotifier: s.channelNotifier,
|
||||
addrs: s.addrSource,
|
||||
}
|
||||
backupFile := chanbackup.NewMultiFile(cfg.BackupFilePath)
|
||||
backupFile := chanbackup.NewMultiFile(
|
||||
cfg.BackupFilePath, cfg.NoBackupArchive,
|
||||
)
|
||||
startingChans, err := chanbackup.FetchStaticChanBackups(
|
||||
s.chanStateDB, s.addrSource,
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user