This commit adds caching to our route finding. Caching is done on a tuple-basis mapping a (dest, amt) pair to a previously calculated set of shortest paths. The cache invalidated on two occasions: when a block closes a set of transactions, or we received a new channel update or channel announcement message. With this change, payments are now snappier from the PoV of an application developer as we no longer need to do a series of disk-seeks before we dispatch each payment. |
||
---|---|---|
.. | ||
testdata | ||
errors.go | ||
graph.go | ||
heap_test.go | ||
heap.go | ||
log.go | ||
notifications_test.go | ||
notifications.go | ||
pathfind_test.go | ||
pathfind.go | ||
README.md | ||
router_test.go | ||
router.go |
routing
[]
(https://travis-ci.org/lightningnetwork/lnd)
[
]
(https://github.com/lightningnetwork/lnd/blob/master/LICENSE)
[
]
(http://godoc.org/github.com/lightningnetwork/lnd/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