lnd/routing
Andras Banki-Horvath 3d5f33a0cf
routing: fail in-flight attempts cleanly on terminal payment failure
In case of a multi shard payment with more than one in-flight shards,
one shard quitting with a terminal failure will stop the payment
lifecycle and close the `shardHandler`'s `quit` channel. In the
`collectResult` function we're waiting for the `Switch` to
asynchronously return a result for each shard. This may have been
interrupted by the aformentioned `quit` channel's closing skipping
attempt failure (or success) notification towards the control tower
and therefore skipping proper settle/fail info fill in the channel db.
Since payments have a composite state of a global failure reason and
settle/fail info for all attempts, any attempt with an unfilled
settle/fail info keeps a payment in-flight even if the payment itself
isn't in-flight anymore.
2022-04-12 11:56:33 +02:00
..
chainview multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
localchans multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
route multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
shards multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
testdata routing: add private key attribute in router test 2021-06-23 18:13:02 +08:00
ann_validation.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
bandwidth_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
bandwidth.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
control_tower_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
control_tower.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
errors.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
graph.go multi: use single read transaction for path finding 2021-10-22 09:32:49 +02:00
heap_test.go routing: optimize path finding structures 2019-10-24 21:38:07 -03:00
heap.go multi: use minimal policy in cache 2021-09-29 17:00:04 +02:00
integrated_routing_context_test.go multi: use single read transaction for path finding 2021-10-22 09:32:49 +02:00
integrated_routing_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
log.go routing: define subsystem constant 2019-12-11 00:17:04 +01:00
missioncontrol_state_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
missioncontrol_state.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
missioncontrol_store_test.go routing: store missioncontrol state in blocks and eliminate cursor use 2021-07-26 17:02:11 +02:00
missioncontrol_store.go routing: fix memory corruption in MC store 2021-12-08 23:10:16 +01:00
missioncontrol_test.go routing: store missioncontrol state in blocks and eliminate cursor use 2021-07-26 17:02:11 +02:00
missioncontrol.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
mock_graph_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
mock_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
nodepair.go routing: extended DirectedNodePair functionality 2019-08-13 18:45:06 +02:00
notifications_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
notifications.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
pathfind_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
pathfind.go multi: thread bandwidth check amount down to MayAddOutgoingHtlc 2021-10-19 09:50:51 +02:00
payment_lifecycle_test.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
payment_lifecycle.go routing: fail in-flight attempts cleanly on terminal payment failure 2022-04-12 11:56:33 +02:00
payment_session_source.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
payment_session_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
payment_session.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
probability_estimator_test.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
probability_estimator.go multi: formatting and comment fixes 2022-02-10 11:02:02 +01:00
README.md multi: unify code blocks in READMEs 2021-01-22 09:14:11 +01:00
result_interpretation_test.go multi: run gosimports 2022-02-10 11:02:01 +01:00
result_interpretation.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00
router_test.go routing: fail in-flight attempts cleanly on terminal payment failure 2022-04-12 11:56:33 +02:00
router.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
setup_test.go channeldb/test: test with postgres 2021-10-29 10:54:44 +02:00
stats.go routing/router: log aggregate graph processing stats 2019-06-13 18:18:30 -07:00
unified_policies_test.go multi: move bandwidth hints behind interface 2021-10-19 09:50:49 +02:00
unified_policies.go multi: use btcd's btcec/v2 and btcutil modules 2022-03-09 19:02:37 +01:00
validation_barrier_test.go routing+discovery: uniform error codes in routing 2022-01-05 04:27:33 +08:00
validation_barrier.go multi: Fix typos [skip ci] 2022-01-24 12:19:02 +02:00

routing

Build Status MIT licensed GoDoc

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