mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-27 18:22:24 +01:00
routing: use amount to send for time lock weight
The time lock weight for a hop is supposed to be proportional to the amount that is sent/locked, but in a previous change we switched to the net amount, where inbound fees aren't yet applied. This is corrected in this commit.
This commit is contained in:
parent
b0f0715813
commit
0358b3a0fa
@ -823,7 +823,7 @@ func findPath(g *graphParams, r *RestrictParams, cfg *PathFindingConfig,
|
||||
// weight composed of the fee that this node will charge and
|
||||
// the amount that will be locked for timeLockDelta blocks in
|
||||
// the HTLC that is handed out to fromVertex.
|
||||
weight := edgeWeight(netAmountToReceive, fee, timeLockDelta)
|
||||
weight := edgeWeight(amountToSend, fee, timeLockDelta)
|
||||
|
||||
// Compute the tentative weight to this new channel/edge
|
||||
// which is the weight from our toNode to the target node
|
||||
|
Loading…
x
Reference in New Issue
Block a user