Skip to content

Commit 935e7f1

Browse files
committed
lnwallet: remove unused parameters in LightningChannel methods
1 parent 14e3719 commit 935e7f1

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

lnwallet/channel.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ func (c *commitment) toDiskCommit(
566566
// restore commitment state written to disk back into memory once we need to
567567
// restart a channel session.
568568
func (lc *LightningChannel) diskHtlcToPayDesc(feeRate chainfee.SatPerKWeight,
569-
commitHeight uint64, htlc *channeldb.HTLC, localCommitKeys,
569+
htlc *channeldb.HTLC, localCommitKeys *CommitmentKeyRing,
570570
remoteCommitKeys *CommitmentKeyRing, whoseCommit lntypes.ChannelParty,
571571
) (PaymentDescriptor, error) {
572572

@@ -654,8 +654,8 @@ func (lc *LightningChannel) diskHtlcToPayDesc(feeRate chainfee.SatPerKWeight,
654654
// to a set of incoming and outgoing payment descriptors. Once reconstructed,
655655
// these payment descriptors can be re-inserted into the in-memory updateLog
656656
// for each side.
657-
func (lc *LightningChannel) extractPayDescs(commitHeight uint64,
658-
feeRate chainfee.SatPerKWeight, htlcs []channeldb.HTLC, localCommitKeys,
657+
func (lc *LightningChannel) extractPayDescs(feeRate chainfee.SatPerKWeight,
658+
htlcs []channeldb.HTLC, localCommitKeys *CommitmentKeyRing,
659659
remoteCommitKeys *CommitmentKeyRing, whoseCommit lntypes.ChannelParty,
660660
) ([]PaymentDescriptor, []PaymentDescriptor, error) {
661661

@@ -675,7 +675,7 @@ func (lc *LightningChannel) extractPayDescs(commitHeight uint64,
675675
htlc := htlc
676676

677677
payDesc, err := lc.diskHtlcToPayDesc(
678-
feeRate, commitHeight, &htlc,
678+
feeRate, &htlc,
679679
localCommitKeys, remoteCommitKeys,
680680
whoseCommit,
681681
)
@@ -728,7 +728,6 @@ func (lc *LightningChannel) diskCommitToMemCommit(
728728
// HTLC"s into PaymentDescriptor's so we can re-insert them into our
729729
// update log.
730730
incomingHtlcs, outgoingHtlcs, err := lc.extractPayDescs(
731-
diskCommit.CommitHeight,
732731
chainfee.SatPerKWeight(diskCommit.FeePerKw),
733732
diskCommit.Htlcs, localCommitKeys, remoteCommitKeys,
734733
whoseCommit,

lnwallet/channel_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10379,7 +10379,7 @@ func TestExtractPayDescs(t *testing.T) {
1037910379
// NOTE: we use nil commitment key rings to avoid checking the htlc
1038010380
// scripts(`genHtlcScript`) as it should be tested independently.
1038110381
incomingPDs, outgoingPDs, err := lnChan.extractPayDescs(
10382-
0, 0, htlcs, nil, nil, lntypes.Local,
10382+
0, htlcs, nil, nil, lntypes.Local,
1038310383
)
1038410384
require.NoError(t, err)
1038510385

0 commit comments

Comments
 (0)