mirror of
https://github.com/aljazceru/breez-lnd.git
synced 2025-12-18 06:34:27 +01: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