channeldb+lnwallet: store updates the peer should sign under new key

This fixes a long-standing force close bug. When we receive a
revocation, store the updates that the remote should sign next under
a new database key. Previously, these were not persisted which would
lead to force closure.
This commit is contained in:
nsa
2020-07-02 02:16:04 -04:00
parent a39c91fbcb
commit e4188ba9c2
4 changed files with 326 additions and 9 deletions

View File

@@ -398,7 +398,7 @@ func TestRestoreChannelShells(t *testing.T) {
if err != ErrNoRestoredChannelMutation {
t.Fatalf("able to mutate restored channel")
}
err = channel.AdvanceCommitChainTail(nil)
err = channel.AdvanceCommitChainTail(nil, nil)
if err != ErrNoRestoredChannelMutation {
t.Fatalf("able to mutate restored channel")
}