Skip to content

Conversation

@t-bast
Copy link
Member

@t-bast t-bast commented Apr 24, 2025

Instead of having multiple overloads for addSigs, we move each one of them inside the corresponding TransactionWithInputInfo. This is part of an effort to group the logic belonging to each type of transaction in the same place to make it easier to review and use.

This is a purely mechanical refactoring, where code has simply been cut and pasted. The only functional change is for HtlcPenaltyTx, where we incorrectly used the witness for a MainPenaltyTx, which was actually smaller. We were thus under-estimating the fees we had to pay to reach the desired feerate, which isn't much of an issue, but it's better to use the correct witness for consistency.

In the second commit, we remove the unused minRelayFee field.

@t-bast t-bast force-pushed the refactor-add-sigs branch from 05ebfb5 to 5c7be5d Compare April 24, 2025 13:27
@t-bast t-bast marked this pull request as ready for review April 24, 2025 13:27
@t-bast t-bast requested a review from sstone April 24, 2025 13:27
t-bast added 2 commits April 24, 2025 17:09
Instead of having multiple overloads for `addSigs`, we move each one of
them inside the corresponding `TransactionWithInputInfo`. This is part
of an effort to group the logic belonging to each type of transaction
in the same place to make it easier to review and use.

This is a purely mechanical refactoring, where code has simply been cut
and pasted. The only functional change is for `HtlcPenaltyTx`, where we
incorrectly used the witness for a `MainPenaltyTx`, which was actually
smaller. We were thus under-estimating the fees we had to pay to reach
the desired feerate, which isn't much of an issue, but it's better to
use the correct witness for consistency.
This field was unused, and quite confusing. We should remove it.
@t-bast t-bast force-pushed the refactor-add-sigs branch from 5c7be5d to d0e20b8 Compare April 24, 2025 15:09
@t-bast t-bast merged commit 76eb6cb into master Apr 24, 2025
1 check passed
@t-bast t-bast deleted the refactor-add-sigs branch April 24, 2025 15:25
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.

3 participants