a7fe7ae941
In this commit we fix an existing miscalculation in the fees that we prescribe within the onion payloads for multi-hop routes. Before this commit, if a route had more than 3 hops, then we would erroneously give the second to last hop zero fees. In this commit we correct this behavior, and also re-write the fee calculation code fragment within newRoute for readability and clarity. There are now only two cases: this is the last hop, and this is any other hop. In the case of the last hop, simply send the exact amount with no additional fee. In the case of an intermediate hop, we use the _prior_ (closer to the destination) hop to calculate the amount of fees we need, which allows us to compute the incoming flow. Using that incoming flow, we then can compute the amount that the hop should forward out. Partially fixes #391. |
||
---|---|---|
.. | ||
chainview | ||
testdata | ||
errors.go | ||
graph.go | ||
heap_test.go | ||
heap.go | ||
log.go | ||
missioncontrol.go | ||
notifications_test.go | ||
notifications.go | ||
pathfind_test.go | ||
pathfind.go | ||
README.md | ||
router_test.go | ||
router.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