Skip to content

Commit a6cf6f4

Browse files
committed
lnwallet+peer: remove unnecessary MaxPendingAmount method
We don't need this method, as we can directly access it from the peer via public fields with its current usage.
1 parent 5d1eaaf commit a6cf6f4

File tree

2 files changed

+1
-7
lines changed

2 files changed

+1
-7
lines changed

lnwallet/channel.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6336,9 +6336,3 @@ func (lc *LightningChannel) RemoteCommitHeight() uint64 {
63366336
func (lc *LightningChannel) FwdMinHtlc() lnwire.MilliSatoshi {
63376337
return lc.localChanCfg.MinHTLC
63386338
}
6339-
6340-
// MaxPendingAmount returns the maximum HTLC value that can be pending at
6341-
// any time over this channel.
6342-
func (lc *LightningChannel) MaxPendingAmount() lnwire.MilliSatoshi {
6343-
return lc.localChanCfg.MaxPendingAmount
6344-
}

peer.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1710,7 +1710,7 @@ out:
17101710
defaultPolicy := p.server.cc.routingPolicy
17111711
forwardingPolicy := &htlcswitch.ForwardingPolicy{
17121712
MinHTLC: fwdMinHtlc,
1713-
MaxHTLC: lnChan.MaxPendingAmount(),
1713+
MaxHTLC: newChan.LocalChanCfg.MaxPendingAmount,
17141714
BaseFee: defaultPolicy.BaseFee,
17151715
FeeRate: defaultPolicy.FeeRate,
17161716
TimeLockDelta: defaultPolicy.TimeLockDelta,

0 commit comments

Comments
 (0)