Skip to content

Conversation

@joostjager
Copy link
Contributor

This PR fixes inconsistencies in the returned failure messages when forwarding non-strict.

@joostjager joostjager changed the title Non strict error htlcswitch: fix non-strict forwarding failures Sep 27, 2019
Copy link
Contributor

@cfromknecht cfromknecht left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice fix and refactor!

@joostjager joostjager added this to the 0.9 milestone Oct 8, 2019
@joostjager joostjager force-pushed the non-strict-error branch 5 times, most recently from acb7e9b to 8de45d9 Compare October 9, 2019 15:23
@joostjager joostjager requested a review from Roasbeef October 9, 2019 15:24
@joostjager joostjager requested a review from wpaulino October 21, 2019 08:55
Copy link
Member

@Roasbeef Roasbeef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM ☄️

Needs a rebase, then ready to land!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

This is already checked in EligibleToForward()
In the scenario where the requested channel does not have enough balance
and another channel towards the same node generates a different failure,
we erroneously returned UnknownNextPeer instead of the expected
TemporaryChannelFailure.

This commit rewrites the non-strict forwarding logic in the switch to
return the proper failure message. Part of this is moving the link
balance check inside the link.
@joostjager joostjager self-assigned this Oct 23, 2019
@joostjager joostjager merged commit 3cfd1eb into lightningnetwork:master Oct 23, 2019
@wpaulino wpaulino removed their request for review October 23, 2019 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants