mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
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:
@@ -797,7 +797,7 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
fwdPkg := NewFwdPkg(channel.ShortChanID(), oldRemoteCommit.CommitHeight,
|
||||
diskCommitDiff.LogUpdates, nil)
|
||||
|
||||
err = channel.AdvanceCommitChainTail(fwdPkg)
|
||||
err = channel.AdvanceCommitChainTail(fwdPkg, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to append to revocation log: %v", err)
|
||||
}
|
||||
@@ -845,7 +845,7 @@ func TestChannelStateTransition(t *testing.T) {
|
||||
|
||||
fwdPkg = NewFwdPkg(channel.ShortChanID(), oldRemoteCommit.CommitHeight, nil, nil)
|
||||
|
||||
err = channel.AdvanceCommitChainTail(fwdPkg)
|
||||
err = channel.AdvanceCommitChainTail(fwdPkg, nil)
|
||||
if err != nil {
|
||||
t.Fatalf("unable to append to revocation log: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user