Merge pull request #2074 from Roasbeef/chan-close-summary-fix-short-chan-remote-node
lnwallet: properly set the short chan ID for remote unilateral close …
This commit is contained in:
commit
0e683d895b
@ -5109,6 +5109,7 @@ func NewUnilateralCloseSummary(chanState *channeldb.OpenChannel, signer Signer,
|
|||||||
IsPending: true,
|
IsPending: true,
|
||||||
RemoteCurrentRevocation: chanState.RemoteCurrentRevocation,
|
RemoteCurrentRevocation: chanState.RemoteCurrentRevocation,
|
||||||
RemoteNextRevocation: chanState.RemoteNextRevocation,
|
RemoteNextRevocation: chanState.RemoteNextRevocation,
|
||||||
|
ShortChanID: chanState.ShortChanID(),
|
||||||
LocalChanConfig: chanState.LocalChanCfg,
|
LocalChanConfig: chanState.LocalChanCfg,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4805,6 +4805,16 @@ func TestChannelUnilateralClosePendingCommit(t *testing.T) {
|
|||||||
t.Fatalf("unable to find alice's commit resolution")
|
t.Fatalf("unable to find alice's commit resolution")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The proper short channel ID should also be set in Alice's close
|
||||||
|
// channel summary.
|
||||||
|
if aliceCloseSummary.ChannelCloseSummary.ShortChanID !=
|
||||||
|
aliceChannel.ShortChanID() {
|
||||||
|
|
||||||
|
t.Fatalf("wrong short chan ID, expected %v got %v",
|
||||||
|
aliceChannel.ShortChanID(),
|
||||||
|
aliceCloseSummary.ChannelCloseSummary.ShortChanID)
|
||||||
|
}
|
||||||
|
|
||||||
aliceSignDesc := aliceCloseSummary.CommitResolution.SelfOutputSignDesc
|
aliceSignDesc := aliceCloseSummary.CommitResolution.SelfOutputSignDesc
|
||||||
|
|
||||||
// Finally, we'll ensure that we're able to properly sweep our output
|
// Finally, we'll ensure that we're able to properly sweep our output
|
||||||
|
Loading…
Reference in New Issue
Block a user