mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
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:
@@ -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