|
6 | 6 | "github.com/btcsuite/btcd/btcutil" |
7 | 7 | graphdb "github.com/lightningnetwork/lnd/graph/db" |
8 | 8 | "github.com/lightningnetwork/lnd/graph/db/models" |
9 | | - "github.com/lightningnetwork/lnd/lntypes" |
10 | 9 | "github.com/lightningnetwork/lnd/lnwire" |
11 | 10 | "github.com/lightningnetwork/lnd/routing/route" |
12 | 11 | ) |
@@ -379,13 +378,11 @@ func (u *edgeUnifier) getEdgeNetwork(netAmtReceived lnwire.MilliSatoshi, |
379 | 378 |
|
380 | 379 | capMsat = edge.policy.MaxHTLC |
381 | 380 | } |
382 | | - maxCapMsat = lntypes.Max(capMsat, maxCapMsat) |
| 381 | + maxCapMsat = max(capMsat, maxCapMsat) |
383 | 382 |
|
384 | 383 | // Track the maximum time lock of all channels that are |
385 | 384 | // candidate for non-strict forwarding at the routing node. |
386 | | - maxTimelock = lntypes.Max( |
387 | | - maxTimelock, edge.policy.TimeLockDelta, |
388 | | - ) |
| 385 | + maxTimelock = max(maxTimelock, edge.policy.TimeLockDelta) |
389 | 386 |
|
390 | 387 | outboundFee := int64(edge.policy.ComputeFee(amt)) |
391 | 388 | fee := outboundFee + inboundFee |
@@ -440,10 +437,10 @@ func (u *edgeUnifier) getEdgeNetwork(netAmtReceived lnwire.MilliSatoshi, |
440 | 437 |
|
441 | 438 | // minAmt returns the minimum amount that can be forwarded on this connection. |
442 | 439 | func (u *edgeUnifier) minAmt() lnwire.MilliSatoshi { |
443 | | - min := lnwire.MaxMilliSatoshi |
| 440 | + minAmount := lnwire.MaxMilliSatoshi |
444 | 441 | for _, edge := range u.edges { |
445 | | - min = lntypes.Min(min, edge.policy.MinHTLC) |
| 442 | + minAmount = min(minAmount, edge.policy.MinHTLC) |
446 | 443 | } |
447 | 444 |
|
448 | | - return min |
| 445 | + return minAmount |
449 | 446 | } |
0 commit comments