lnwallet: remove duplicate chanCfg fields, use channelState

This commit is contained in:
Johan T. Halseth committed 2020-01-06 11:42:02 +01:00
1 parent e2b050aca3
commit 1a4f81ed90
3 files changed
+66 -65

No files matched your search

+4 -6
View File
@@ -421,10 +421,8 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) {
// Construct a LightningChannel manually because we don't have nor need all
// of the dependencies.
channel := LightningChannel{
channelState: &channelState,
Signer: signer,
localChanCfg: &channelState.LocalChanCfg,
remoteChanCfg: &channelState.RemoteChanCfg,
channelState: &channelState,
Signer: signer,
}
err = channel.createSignDesc()
if err != nil {
@@ -845,8 +843,8 @@ func TestCommitmentAndHTLCTransactions(t *testing.T) {
// commitment tx.
htlcResolutions, err := extractHtlcResolutions(
chainfee.SatPerKWeight(test.commitment.FeePerKw), true, signer,
htlcs, keys, channel.localChanCfg, channel.remoteChanCfg,
commitTx.TxHash(),
htlcs, keys, &channel.channelState.LocalChanCfg,
&channel.channelState.RemoteChanCfg, commitTx.TxHash(),
)
if err != nil {
t.Errorf("Case %d: Failed to extract HTLC resolutions: %v", i, err)