You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently experimenting with a scenario in which I want to dynamically react to incoming HTLCs and, for example, adapt my channel policies. For this, I utilize the htlc_accepted hook offered by the plugin API and depending on the circumstances return a corresponding failure_message.
However, this currently does only work for failure messages that do not need additional parameters or require to append a channel update. That is, returning any failure message with the UPDATE/0x1000 failure code (cf. BOLT 04) currently results in an invalid fail onion.
It would be great if the plugin API would offer the ability to specify the additional fields required by the failure message or at least populate them with sane default values so failures with the UPDATE failure code could be returned by the htlc_accepted hook.
Issue and Steps to Reproduce
I'm currently experimenting with a scenario in which I want to dynamically react to incoming HTLCs and, for example, adapt my channel policies. For this, I utilize the
htlc_accepted
hook offered by the plugin API and depending on the circumstances return a correspondingfailure_message
.However, this currently does only work for failure messages that do not need additional parameters or require to append a channel update. That is, returning any failure message with the
UPDATE
/0x1000
failure code (cf. BOLT 04) currently results in an invalid fail onion.It would be great if the plugin API would offer the ability to specify the additional fields required by the failure message or at least populate them with sane default values so failures with the
UPDATE
failure code could be returned by thehtlc_accepted
hook.For my testing purposes, I implemented the latter approach, which can be seen here.
The text was updated successfully, but these errors were encountered: