Skip to content

lightningd: put in nothing for an RBF when no plugin answers rbf_channel - #54

Merged
kwsantiago merged 1 commit into
blake2b-unifiedfrom
rbf-hook-default-funding
Oct 19, 2026
Merged

kwsantiago merged 1 commit into
blake2b-unifiedfrom
rbf-hook-default-funding

Conversation

@kwsantiago

Copy link
Copy Markdown

When the peer starts an RBF of a dual-funded open, lightningd asks the rbf_channel hook how much to put in. With no plugin on that hook (for instance with the funder plugin disabled), it answered with payload->our_funding never set. dualopend then took whatever was in that memory as our contribution: in testing, an absurd total that made it abort the RBF, but a smaller value would be offered as funds we never added inputs for.

It now starts at zero, as the openchannel2 payload's accepter_funding already does, so the accepter puts in nothing unless a plugin says otherwise.

test_v2_rbf_without_rbf_channel_plugin: an accepter without the funder plugin accepts an RBF and the channel confirms with nothing from it. Without the change it fails with Total funding_satoshis ... too large.

Changelog-None

@kwsantiago
kwsantiago force-pushed the rbf-hook-default-funding branch from a7f2655 to 93972e7 Compare October 19, 2026 00:33
@kwsantiago
kwsantiago force-pushed the rbf-hook-default-funding branch from 93972e7 to 9985de0 Compare October 19, 2026 13:05
@kwsantiago
kwsantiago merged commit 46b5786 into blake2b-unified Oct 19, 2026
87 of 90 checks passed
@kwsantiago
kwsantiago deleted the rbf-hook-default-funding branch October 19, 2026 23:48
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.

1 participant