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

lang: Add state size override #121

Merged
merged 2 commits into from
Mar 24, 2021
Merged

lang: Add state size override #121

merged 2 commits into from
Mar 24, 2021

Conversation

armaniferrante
Copy link
Member

@armaniferrante armaniferrante commented Mar 24, 2021

Allows one to specify the size of a state account. If none is provided, uses the (current) default, i.e., whatever the size of the returned value of the new ctor (plus 8 bytes for the account discriminator).

Example:

pub const MY_SIZE: u64 = 100;

#[state(MY_SIZE)]
pub struct MyState {
...
}

@armaniferrante armaniferrante merged commit b7cafcd into master Mar 24, 2021
@armaniferrante armaniferrante deleted the armani/statesize branch March 24, 2021 17:35
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.

None yet

1 participant