-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cache calculated bump seeds in context #1367
Conversation
Given that we know which accounts require a PDA check at compile-time, would it be more efficient to generate a struct like
would generate
With a BTreeMap with string keys, there are no compile-time checks for account name refactors as well. If i change the struct field name from |
@billythedummy that sounds good. How would you expect to access this from the context? |
so i think |
Closes #1364.
Pre-requisite for #1361. This is needed for non anchor accounts that won't have the account header and so can't store bump seeds directly in the account data (and so the bump needs to be stored in some other associated account).
One can use
ctx.bumps.get("<my_account_name>")
to get a bump seed already searched for in the accounts context.