mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-29 18:10:48 +02:00
chanbackup: refuse to start the SubSwapper if we can't read the SCB file
In this commit, we add an additional defense against starting up with an invalid SCB state. With this commit, we'll now fail to start up if we're unable to update or read the existing SCB state from disk. This will prevent an lnd node from starting up with an invalid SCB file, an SCB file it can't decrypt, or an SCB left over from another node.
This commit is contained in:
@ -21,7 +21,7 @@ type mockSwapper struct {
|
||||
|
||||
func newMockSwapper(keychain keychain.KeyRing) *mockSwapper {
|
||||
return &mockSwapper{
|
||||
swaps: make(chan PackedMulti),
|
||||
swaps: make(chan PackedMulti, 1),
|
||||
keyChain: keychain,
|
||||
swapState: &Multi{},
|
||||
}
|
||||
|
Reference in New Issue
Block a user