mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-04 02:36:17 +02:00
routing: use unified policy for build route
This commit is contained in:
@@ -267,3 +267,15 @@ func (u *unifiedPolicy) getPolicyNetwork(
|
||||
|
||||
return &modifiedPolicy
|
||||
}
|
||||
|
||||
// minAmt returns the minimum amount that can be forwarded on this connection.
|
||||
func (u *unifiedPolicy) minAmt() lnwire.MilliSatoshi {
|
||||
min := lnwire.MaxMilliSatoshi
|
||||
for _, edge := range u.edges {
|
||||
if edge.policy.MinHTLC < min {
|
||||
min = edge.policy.MinHTLC
|
||||
}
|
||||
}
|
||||
|
||||
return min
|
||||
}
|
||||
|
Reference in New Issue
Block a user