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

Remove setters from PsbtV2.PSBT_GLOBAL_INPUT_COUNT and PsbtV2.PSBT_GLOBAL_OUTPUT_COUNT #141

Open
Shadouts opened this issue Oct 14, 2024 · 0 comments
Labels
@caravan/psbt Major version required The implied, required change to resolve the issue may require a major version increment

Comments

@Shadouts
Copy link
Contributor

The psbtv2 key PSBT_GLOBAL_INPUT_COUNT and PSBT_GLOBAL_OUTPUT_COUNT represent the number of inputs or outputs on the psbt. On the PsbtV2 class, these values have setters, however, because setters are public, they might cause these values to disagree with the real number of inputs or outputs tracked in the psbt.

The two values must remain in sync with the number of inputs or outputs being tracked in the map.

I think the easiest way to do this is to remove the setters and only allow the add and delete input/output methods to modify the value of these fields. However, this is a backward incompatible change for those that might require the existence of the setters.

@Shadouts Shadouts added @caravan/psbt Major version required The implied, required change to resolve the issue may require a major version increment labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@caravan/psbt Major version required The implied, required change to resolve the issue may require a major version increment
Projects
None yet
Development

No branches or pull requests

1 participant