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

Allow Budget::try_from_configs inputs to be less than current xdr-defined count #1407

Merged
merged 7 commits into from
Apr 24, 2024

Conversation

jayz22
Copy link
Contributor

@jayz22 jayz22 commented Apr 19, 2024

What

Resolves #1388

Why

The current way of constructing the Budget from config enforces the config size must match the protocol-defined count (ContractCostType::variants().len()). While this ensures the validity of the config entry for the current protocol, it does not take into consideration config from an earlier protocol, with fewer number of cost types.

Known limitations

[TODO or N/A]

@jayz22 jayz22 requested review from graydon, sisuresh, dmkozh and a team as code owners April 19, 2024 17:50
@jayz22 jayz22 force-pushed the fix-cost-len branch 2 times, most recently from 64e8f1d to 26d29a1 Compare April 23, 2024 21:54
@jayz22 jayz22 marked this pull request as draft April 23, 2024 22:51
@jayz22 jayz22 marked this pull request as ready for review April 23, 2024 23:32
@jayz22 jayz22 changed the title Use Vec for budget internal data structures Allow Budget::try_from_configs inputs to be less than current xdr-defined count Apr 23, 2024
@dmkozh dmkozh added this pull request to the merge queue Apr 24, 2024
Merged via the queue into stellar:main with commit b00c124 Apr 24, 2024
17 checks passed
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.

Use a vector instead of an array for holding cost types
3 participants