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

Better way to calculate Transaction Weight given an Escrow Type #32

Closed
storopoli opened this issue Mar 2, 2025 · 0 comments · Fixed by #41
Closed

Better way to calculate Transaction Weight given an Escrow Type #32

storopoli opened this issue Mar 2, 2025 · 0 comments · Fixed by #41
Labels
good first issue Good for newcomers

Comments

@storopoli
Copy link
Owner

Right now we hardcode 200 vbytes in

scrow/src/util.rs

Lines 15 to 19 in 3b4d5f7

/// P2TR Transaction weight for 1 input and 1 output.
///
/// Used to calculate the fee for the transaction that spends the escrow.
/// This is a conservative measure to ensure sufficient fees.
pub(crate) const P2TR_TX_WEIGHT_FUNDING: u64 = 200;

But we should determine give the escrow type (A, B, or C) the transaction weight to get better fees estimates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant