Remove setters from PsbtV2.PSBT_GLOBAL_INPUT_COUNT and PsbtV2.PSBT_GLOBAL_OUTPUT_COUNT #141
Labels
@caravan/psbt
Major version required
The implied, required change to resolve the issue may require a major version increment
The psbtv2 key
PSBT_GLOBAL_INPUT_COUNT
andPSBT_GLOBAL_OUTPUT_COUNT
represent the number of inputs or outputs on the psbt. On thePsbtV2
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.
The text was updated successfully, but these errors were encountered: