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

Proposal: Use SanitizedMessage when possible in svm/account_loader.rs #35390

Merged
merged 1 commit into from
Mar 2, 2024
Merged

Proposal: Use SanitizedMessage when possible in svm/account_loader.rs #35390

merged 1 commit into from
Mar 2, 2024

Conversation

LucasSte
Copy link
Contributor

@LucasSte LucasSte commented Mar 1, 2024

Problem

In svm/src/account_loader.rs SanitizedTransaction is passed between functions in many cases, when just a SanitizedMessage can work without any loss.

Summary of Changes

I swapped SanitizedTransaction for SanitizedMessage in the pertinent locations. One item to be cautious in the review is that I removed one if-condition (see line 131 in account_loader.rs) marked as unused, because the message was previously sanitized, so that the check would never evaluate true.

Copy link

codecov bot commented Mar 1, 2024

Codecov Report

Attention: Patch coverage is 94.44444% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 81.7%. Comparing base (e8c87e8) to head (a4de72f).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #35390     +/-   ##
=========================================
- Coverage    81.8%    81.7%   -0.1%     
=========================================
  Files         834      834             
  Lines      224815   224806      -9     
=========================================
- Hits       183919   183874     -45     
- Misses      40896    40932     +36     

@LucasSte LucasSte marked this pull request as ready for review March 1, 2024 15:33
Copy link
Contributor

@dmakarov dmakarov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@LucasSte LucasSte merged commit bd93285 into solana-labs:master Mar 2, 2024
35 checks passed
@LucasSte LucasSte deleted the test-message branch March 2, 2024 09:12
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.

3 participants