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.
This commit is contained in:
Olaoluwa Osuntokun 2019-02-25 12:51:07 -03:00
parent 5d1eaaffa4
commit a6cf6f4237
No known key found for this signature in database
GPG Key ID: CE58F7F8E20FD9A2
2 changed files with 1 additions and 7 deletions

@ -6336,9 +6336,3 @@ func (lc *LightningChannel) RemoteCommitHeight() uint64 {
func (lc *LightningChannel) FwdMinHtlc() lnwire.MilliSatoshi {
return lc.localChanCfg.MinHTLC
}
// MaxPendingAmount returns the maximum HTLC value that can be pending at
// any time over this channel.
func (lc *LightningChannel) MaxPendingAmount() lnwire.MilliSatoshi {
return lc.localChanCfg.MaxPendingAmount
}

@ -1710,7 +1710,7 @@ out:
defaultPolicy := p.server.cc.routingPolicy
forwardingPolicy := &htlcswitch.ForwardingPolicy{
MinHTLC: fwdMinHtlc,
MaxHTLC: lnChan.MaxPendingAmount(),
MaxHTLC: newChan.LocalChanCfg.MaxPendingAmount,
BaseFee: defaultPolicy.BaseFee,
FeeRate: defaultPolicy.FeeRate,
TimeLockDelta: defaultPolicy.TimeLockDelta,