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

Support using references to account info in account struct #2324

Closed
Henry-E opened this issue Dec 19, 2022 · 2 comments
Closed

Support using references to account info in account struct #2324

Henry-E opened this issue Dec 19, 2022 · 2 comments
Labels

Comments

@Henry-E
Copy link

Henry-E commented Dec 19, 2022

As people start using more and more accounts in their programs thanks to the lookup table functionality, they might start having issues with stack memory from having so many accounts in the account struct. One possible solution to this would be to allow references to AccountInfo in the account struct instead of cloning, which we currently do. Supporting syntax like this possibly:

#[derive(Accounts)]
pub struct MyStruct<'a, 'info> {
   pub my_account: &'a AccountInfo<'info>,
}
@cavemanloverboy
Copy link
Contributor

should probably close this

@acheroncrypto
Copy link
Collaborator

Added in #2656

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants