Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lightningd: figure out optimal channel *before* forward_htlc hook, allow override #5605

Merged

Conversation

rustyrussell
Copy link
Contributor

Otherwise what the hook sees is actually a lie, and if it sets it we might override it.

The side effect is that we add an explicit "forward_to" field, and allow hooks to override it. This lets a hook control channel choice explicitly.

Changelod-Added: Plugins: htlc_accepted_hook return can specify what channel to forward htlc to.

(Interestingly, this fell out of the blinded payments work, where we can be given the peer, rather than the channel, to forward to).

@rustyrussell rustyrussell added this to the v22.10 milestone Sep 19, 2022
@rustyrussell rustyrussell force-pushed the forward-htlc-choose-before-hook branch 2 times, most recently from 48b2657 to da7c4f7 Compare September 19, 2022 03:58
@cdecker cdecker force-pushed the forward-htlc-choose-before-hook branch from da7c4f7 to f007382 Compare September 20, 2022 08:57
@cdecker cdecker self-assigned this Sep 20, 2022
@cdecker
Copy link
Member

cdecker commented Sep 21, 2022

ACK f007382

@cdecker cdecker force-pushed the forward-htlc-choose-before-hook branch from f007382 to 4c185cf Compare September 21, 2022 14:00
@cdecker
Copy link
Member

cdecker commented Sep 21, 2022

Rebased and fixed a conflict, let's see if CI is happy now.

@cdecker cdecker force-pushed the forward-htlc-choose-before-hook branch from 4c185cf to 1a7dc16 Compare September 22, 2022 11:23
@rustyrussell rustyrussell force-pushed the forward-htlc-choose-before-hook branch from 1a7dc16 to 988b0c9 Compare September 23, 2022 05:34
@rustyrussell
Copy link
Contributor Author

Rebased onto #5625 and fixed "Changelod" to "Changelog" typo in commit message!

@cdecker
Copy link
Member

cdecker commented Sep 23, 2022

Most likely requires #5592 to pick up the BOLT changes

Otherwise what the hook sees is actually a lie, and if it sets it
we might override it.

The side effect is that we add an explicit "forward_to" field, and
allow hooks to override it.  This lets a *hook* control channel
choice explicitly.

Changelod-Added: Plugins: `htlc_accepted_hook` return can specify what channel to forward htlc to.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell rustyrussell force-pushed the forward-htlc-choose-before-hook branch from 988b0c9 to b266c30 Compare September 26, 2022 05:24
@rustyrussell
Copy link
Contributor Author

Trivial rebase to pick up lnprototest fixes...

Ack b266c30

@cdecker cdecker merged commit 6e86fa9 into ElementsProject:master Sep 26, 2022
@cdecker cdecker deleted the forward-htlc-choose-before-hook branch September 26, 2022 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants