From d9e9b6197c04098c92f01c35cbd35a535bf141c5 Mon Sep 17 00:00:00 2001 From: "Johan T. Halseth" Date: Thu, 12 Jul 2018 11:02:52 +0200 Subject: [PATCH] lnwallet/channel test: take commitPoint in NewUnilateralCloseSummary --- lnwallet/channel_test.go | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/lnwallet/channel_test.go b/lnwallet/channel_test.go index 7d9af7d62..0370049ef 100644 --- a/lnwallet/channel_test.go +++ b/lnwallet/channel_test.go @@ -4397,8 +4397,10 @@ func TestChannelUnilateralCloseHtlcResolution(t *testing.T) { SpenderTxHash: &commitTxHash, } aliceCloseSummary, err := NewUnilateralCloseSummary( - aliceChannel.channelState, aliceChannel.Signer, aliceChannel.pCache, - spendDetail, aliceChannel.channelState.RemoteCommitment, false, + aliceChannel.channelState, aliceChannel.Signer, + aliceChannel.pCache, spendDetail, + aliceChannel.channelState.RemoteCommitment, + aliceChannel.channelState.RemoteCurrentRevocation, ) if err != nil { t.Fatalf("unable to create alice close summary: %v", err) @@ -4545,8 +4547,10 @@ func TestChannelUnilateralClosePendingCommit(t *testing.T) { // using this commitment, but with the wrong state, we should find that // our output wasn't picked up. aliceWrongCloseSummary, err := NewUnilateralCloseSummary( - aliceChannel.channelState, aliceChannel.Signer, aliceChannel.pCache, - spendDetail, aliceChannel.channelState.RemoteCommitment, false, + aliceChannel.channelState, aliceChannel.Signer, + aliceChannel.pCache, spendDetail, + aliceChannel.channelState.RemoteCommitment, + aliceChannel.channelState.RemoteCurrentRevocation, ) if err != nil { t.Fatalf("unable to create alice close summary: %v", err) @@ -4564,8 +4568,10 @@ func TestChannelUnilateralClosePendingCommit(t *testing.T) { t.Fatalf("unable to fetch remote chain tip: %v", err) } aliceCloseSummary, err := NewUnilateralCloseSummary( - aliceChannel.channelState, aliceChannel.Signer, aliceChannel.pCache, - spendDetail, aliceRemoteChainTip.Commitment, true, + aliceChannel.channelState, aliceChannel.Signer, + aliceChannel.pCache, spendDetail, + aliceRemoteChainTip.Commitment, + aliceChannel.channelState.RemoteNextRevocation, ) if err != nil { t.Fatalf("unable to create alice close summary: %v", err)