mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-28 14:40:51 +02:00
multi: refactor lnwallet/channel.go to use ChannelParty in select places
We also include changes to contractcourt, htlcswitch and peer to stitch the boundaries together.
This commit is contained in:
@@ -2730,7 +2730,12 @@ func (l *channelLink) MayAddOutgoingHtlc(amt lnwire.MilliSatoshi) error {
|
||||
func (l *channelLink) getDustSum(remote bool,
|
||||
dryRunFee fn.Option[chainfee.SatPerKWeight]) lnwire.MilliSatoshi {
|
||||
|
||||
return l.channel.GetDustSum(remote, dryRunFee)
|
||||
party := lntypes.Local
|
||||
if remote {
|
||||
party = lntypes.Remote
|
||||
}
|
||||
|
||||
return l.channel.GetDustSum(party, dryRunFee)
|
||||
}
|
||||
|
||||
// getFeeRate is a wrapper method that retrieves the underlying channel's
|
||||
@@ -2893,13 +2898,13 @@ func dustHelper(chantype channeldb.ChannelType, localDustLimit,
|
||||
|
||||
if localCommit {
|
||||
return lnwallet.HtlcIsDust(
|
||||
chantype, incoming, true, feerate, amt,
|
||||
chantype, incoming, lntypes.Local, feerate, amt,
|
||||
localDustLimit,
|
||||
)
|
||||
}
|
||||
|
||||
return lnwallet.HtlcIsDust(
|
||||
chantype, incoming, false, feerate, amt,
|
||||
chantype, incoming, lntypes.Remote, feerate, amt,
|
||||
remoteDustLimit,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user