Skip to content

dualopend: handle tx_add_output with over MAX_MONEY - #9493

Open
Lagrang3 wants to merge 2 commits into
ElementsProject:masterfrom
Lagrang3:check-max-money-tx-add-output
Open

dualopend: handle tx_add_output with over MAX_MONEY#9493
Lagrang3 wants to merge 2 commits into
ElementsProject:masterfrom
Lagrang3:check-max-money-tx-add-output

Conversation

@Lagrang3

Copy link
Copy Markdown
Collaborator

Harden the handling of tx_add_output messages.
Fail the negotiation if the sum of the outputs exceeds 21M BTC.

Fixes #9492

@Lagrang3
Lagrang3 force-pushed the check-max-money-tx-add-output branch from 5525a6a to 679a200 Compare September 10, 2026 16:52

@jaonoctus jaonoctus left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Left some comments. Also, no new tests for this?

Comment thread common/interactivetx.c Outdated
Comment thread common/interactivetx.c Outdated
Comment thread common/interactivetx.c Outdated
Comment thread common/interactivetx.c Outdated
@madelinevibes madelinevibes added this to the v26.09 milestone Sep 11, 2026
Harden the handling of tx_add_output messages.
Fail the negotiation if the sum of the outputs exceeds 21M BTC.

Changelog-None.

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
Make the MAX_MONEY checks of tx_add_output into an internal API that we
can re-use in interactivetx (used by splices) and dualopend.

Changelog-None

Signed-off-by: Lagrang3 <lagrang3@protonmail.com>
@Lagrang3
Lagrang3 force-pushed the check-max-money-tx-add-output branch from 679a200 to 9a5e6c9 Compare September 11, 2026 07:06
@Lagrang3

Copy link
Copy Markdown
Collaborator Author

@jaonoctus, I am working on tests now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failure to reject tx_add_output amounts above the total bitcoin supply

3 participants