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

Planning module: Missing varint length in size calculation of some placeholders #771

Open
jp1ac4 opened this issue Nov 11, 2024 · 1 comment

Comments

@jp1ac4
Copy link

jp1ac4 commented Nov 11, 2024

As mentioned in #481 (comment), it appears that the planning module doesn't include the varint length for TapScript and TapControlBlock when getting the size, but does for other placeholders:

Placeholder::TapScript(s) => s.len(),
Placeholder::TapControlBlock(cb) => cb.serialize().len(),

Should the varint length be included here for consistency with other placeholders?

Please also see #701 for some other inconsistencies.

@apoelstra
Copy link
Member

Yeah, I think the varints should always be included since they're part of the witness cost.

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

No branches or pull requests

2 participants