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

fix ReadPreimage #11805

Merged
merged 2 commits into from
Sep 9, 2024
Merged

Conversation

zhiqiangxu
Copy link
Contributor

@zhiqiangxu zhiqiangxu commented Sep 9, 2024

  1. When offset>len(preimage), should return nothing instead of panic.
  2. call p.GetPreimage(key) instead of p.po.GetPreimage(key) to update numPreimageRequests and totalPreimageSize.

@zhiqiangxu zhiqiangxu requested review from a team as code owners September 9, 2024 12:26
@zhiqiangxu zhiqiangxu force-pushed the fix_ReadPreimage branch 2 times, most recently from 0638114 to 2c22d74 Compare September 9, 2024 12:30
Copy link

codecov bot commented Sep 9, 2024

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 85.07%. Comparing base (e80d23b) to head (7c67cea).
Report is 39 commits behind head on develop.

Files with missing lines Patch % Lines
cannon/mipsevm/exec/preimage.go 25.00% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #11805      +/-   ##
===========================================
+ Coverage    84.98%   85.07%   +0.08%     
===========================================
  Files           36       36              
  Lines         2784     2787       +3     
===========================================
+ Hits          2366     2371       +5     
+ Misses         350      347       -3     
- Partials        68       69       +1     
Flag Coverage Δ
cannon-go-tests 85.07% <25.00%> (+0.08%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
cannon/mipsevm/exec/preimage.go 79.41% <25.00%> (+8.44%) ⬆️

Copy link
Contributor

@Inphi Inphi left a comment

Choose a reason for hiding this comment

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

Good catch!

@Inphi Inphi added this pull request to the merge queue Sep 9, 2024
Merged via the queue into ethereum-optimism:develop with commit dc2490b Sep 9, 2024
55 checks passed
Inphi added a commit that referenced this pull request Sep 13, 2024
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.

2 participants