This commit improves the shutdown of the router's pending validation tasks, by ensuring the pending tasks exit early if the validation barrier receives a shutdown request. Currently, any goroutines blocked by WaitForDependants will continue execution after a shutdown is signaled. This may lead to unnexpected behavior as the relation between updates is no longer upheld. It also has the side effect of slowing down shutdown, since we continue to process the remaining updates. To remedy this, WaitForDependants now returns an error that signals if a shutdown was requested. The blocked goroutines can exit early upon seeing this error, without also signaling completion of their task to the dependent tasks, which should will now properly wait to read the validation barrier's quit signal. |
||
---|---|---|
.. | ||
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 | ||
validation_barrier.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