mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-22 14:22:37 +01:00
In this commit, we correct the fee calculation when converting from a path to route. Previously we would apply the “no fee” case at the _first_ hop, rather than the last hop. As a result, we needed to swap the edges during path finding, otherwise, if the incoming and outgoing edges had different fee rates, then we would create an invalid onion payload. In this commit we now properly switch fee calculation into three cases: * a single hop route, so there’s no fee * we’re at the first hop in a multi hop route, and we apply the fee for the _next_ hop * we’re at an intermediate hop and the fee calculation proceeds as normal |
||
---|---|---|
.. | ||
chainview | ||
testdata | ||
errors.go | ||
graph.go | ||
heap.go | ||
heap_test.go | ||
log.go | ||
missioncontrol.go | ||
notifications.go | ||
notifications_test.go | ||
pathfind.go | ||
pathfind_test.go | ||
README.md | ||
router.go | ||
router_test.go |
routing
The routing package implements authentication+validation of channel announcements, pruning of the channel graph, path finding within the network, sending outgoing payments into the network and synchronizing new peers to our channel graph state.
Installation and Updating
$ go get -u github.com/lightningnetwork/lnd/routing