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

Include base input fee in fee, in calculate_our_funding_satoshis() #3558

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

optout21
Copy link
Contributor

@optout21 optout21 commented Jan 24, 2025

While working on checks for splicing (#3407), it was found that the still-unused calculate_our_funding_satoshis() method does not take into account the base weight of the inputs in the fee estimation.

This change:

  • Adds a unit test for calculate_our_funding_satoshis() (1st commit)
  • Adds the base weight for inputs to the fee estimation (2nd commit)
  • Breaks up calculate_our_funding_satoshis() into two, estimate_funding_transaction_fee(), and the output calculation. This is to allow using funding tx fee estimation, needed also by splicing (see [Splicing] Partial, handle splice_init & splice_ack messages #3407).

@optout21
Copy link
Contributor Author

Note: #3407 also include this change, I will take care of merge if needed regardless of which PR is merged first.

@optout21 optout21 force-pushed the funding-fee-estimation branch from 8240846 to 4a4ae72 Compare January 24, 2025 21:19
@optout21 optout21 force-pushed the funding-fee-estimation branch from 4a4ae72 to 27784d9 Compare January 24, 2025 21:28
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