-
Notifications
You must be signed in to change notification settings - Fork 329
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
Move code to check_program_modification_slot out of SVM #329
Move code to check_program_modification_slot out of SVM #329
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #329 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 837 837
Lines 226874 226873 -1
=========================================
- Hits 185868 185835 -33
- Misses 41006 41038 +32 |
fn get_program_match_criteria(&self, _program: &Pubkey) -> LoadedProgramMatchCriteria { | ||
LoadedProgramMatchCriteria::NoCriteria | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't we leave the default implementation empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This behavior is very Solana specific. If other users can handle cold starts better, they shouldn't need to implement this function. So there's a default implementation.
* Move code to check_program_modification_slot out of SVM * add documentation for the public function
Problem
The code to
check_program_modification_slot
doesn't belong in SVM. It's an implementation detail that should be handled by the user of SVM.Summary of Changes
Move the code out of SVM and call it using a trait method.
Fixes #