mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
lnwallet: remove unused parameters in LightningChannel methods
This commit is contained in:
parent
14e371948b
commit
935e7f1bee
2 changed files with 5 additions and 6 deletions
|
@ -566,7 +566,7 @@ func (c *commitment) toDiskCommit(
|
|||
// restore commitment state written to disk back into memory once we need to
|
||||
// restart a channel session.
|
||||
func (lc *LightningChannel) diskHtlcToPayDesc(feeRate chainfee.SatPerKWeight,
|
||||
commitHeight uint64, htlc *channeldb.HTLC, localCommitKeys,
|
||||
htlc *channeldb.HTLC, localCommitKeys *CommitmentKeyRing,
|
||||
remoteCommitKeys *CommitmentKeyRing, whoseCommit lntypes.ChannelParty,
|
||||
) (PaymentDescriptor, error) {
|
||||
|
||||
|
@ -654,8 +654,8 @@ func (lc *LightningChannel) diskHtlcToPayDesc(feeRate chainfee.SatPerKWeight,
|
|||
// to a set of incoming and outgoing payment descriptors. Once reconstructed,
|
||||
// these payment descriptors can be re-inserted into the in-memory updateLog
|
||||
// for each side.
|
||||
func (lc *LightningChannel) extractPayDescs(commitHeight uint64,
|
||||
feeRate chainfee.SatPerKWeight, htlcs []channeldb.HTLC, localCommitKeys,
|
||||
func (lc *LightningChannel) extractPayDescs(feeRate chainfee.SatPerKWeight,
|
||||
htlcs []channeldb.HTLC, localCommitKeys *CommitmentKeyRing,
|
||||
remoteCommitKeys *CommitmentKeyRing, whoseCommit lntypes.ChannelParty,
|
||||
) ([]PaymentDescriptor, []PaymentDescriptor, error) {
|
||||
|
||||
|
@ -675,7 +675,7 @@ func (lc *LightningChannel) extractPayDescs(commitHeight uint64,
|
|||
htlc := htlc
|
||||
|
||||
payDesc, err := lc.diskHtlcToPayDesc(
|
||||
feeRate, commitHeight, &htlc,
|
||||
feeRate, &htlc,
|
||||
localCommitKeys, remoteCommitKeys,
|
||||
whoseCommit,
|
||||
)
|
||||
|
@ -728,7 +728,6 @@ func (lc *LightningChannel) diskCommitToMemCommit(
|
|||
// HTLC"s into PaymentDescriptor's so we can re-insert them into our
|
||||
// update log.
|
||||
incomingHtlcs, outgoingHtlcs, err := lc.extractPayDescs(
|
||||
diskCommit.CommitHeight,
|
||||
chainfee.SatPerKWeight(diskCommit.FeePerKw),
|
||||
diskCommit.Htlcs, localCommitKeys, remoteCommitKeys,
|
||||
whoseCommit,
|
||||
|
|
|
@ -10379,7 +10379,7 @@ func TestExtractPayDescs(t *testing.T) {
|
|||
// NOTE: we use nil commitment key rings to avoid checking the htlc
|
||||
// scripts(`genHtlcScript`) as it should be tested independently.
|
||||
incomingPDs, outgoingPDs, err := lnChan.extractPayDescs(
|
||||
0, 0, htlcs, nil, nil, lntypes.Local,
|
||||
0, htlcs, nil, nil, lntypes.Local,
|
||||
)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue