mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 18:10:34 +01:00
8ef829ed80
In this commit we modify the SendPayment loop to optimize for time-to-first-payment-success-or-failure. The prior logic would first attempt to find at least 100 routes to the destination, then iteratively prune them away as errors were encountered. In this commit, we modify this approach to instead take a lazy approach: we first find the current “best” path, attempt to send to that, and if an error occurs we prune a section of the graph by reporting to missionControl, then continue. With this new approach, if the first known path has sufficient capacity, and is available, then the payment speed is greatly improved from the PoV of users. Additionally, we avoid the excessive computation of crawling most of the graph in the k-shortest paths loop. With the decay on missionControl, all routes will now feed information into the central knowledge hung, allowing all payments to iteratively find out the inactive portions of the payment graph. |
||
---|---|---|
.. | ||
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