mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
525ef594c7
In this commit, we fix a regression introduced by a recent bug fix in this area. Before this change, we'd inspect the error returned by `processSendError`, and then fail the payment from the PoV of mission control using the returned error. A recent refactoring removed `processSendError` and combined the logic with `tryApplyChannelUpdate` in order to introduce a new `handleSendError` method that consolidates the logic within the `shardHandler`. Along the way, the behavior of the prior check was replicated in the form of a new internal `failPayment` closure. However, the new function closure ends up returning a `channeldb.FailureReason` instance, which is actually an `error`. In the wild, when `SendToRoute` fails due to an error at the destination, then this new logic caused the `handleSendErorr` method to fail with an error, returning an unstructured error back to the caller, instead of the usual payment failure details. We fix this by no longer checking the `handleSendErorr` for an error as normal. The `handleSendErorr` function as is will always return an error of type `*channeldb.FailureReason`, therefore we don't need to treat it as a normal error. Instead, we check for the type of error returned, and update the control tower state accordingly. With this commit, the test added in the prior commit now passes. Fixes #5477. |
||
---|---|---|
.. | ||
chainview | ||
localchans | ||
route | ||
shards | ||
testdata | ||
ann_validation.go | ||
control_tower_test.go | ||
control_tower.go | ||
errors.go | ||
graph.go | ||
heap_test.go | ||
heap.go | ||
integrated_routing_context_test.go | ||
integrated_routing_test.go | ||
log.go | ||
missioncontrol_state_test.go | ||
missioncontrol_state.go | ||
missioncontrol_store_test.go | ||
missioncontrol_store.go | ||
missioncontrol_test.go | ||
missioncontrol.go | ||
mock_graph_test.go | ||
mock_test.go | ||
nodepair.go | ||
notifications_test.go | ||
notifications.go | ||
pathfind_test.go | ||
pathfind.go | ||
payment_lifecycle_test.go | ||
payment_lifecycle.go | ||
payment_session_source.go | ||
payment_session_test.go | ||
payment_session.go | ||
probability_estimator_test.go | ||
probability_estimator.go | ||
README.md | ||
result_interpretation_test.go | ||
result_interpretation.go | ||
router_test.go | ||
router.go | ||
stats.go | ||
unified_policies_test.go | ||
unified_policies.go | ||
validation_barrier_test.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