-
Notifications
You must be signed in to change notification settings - Fork 81
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
EVM: Native precompile address fe
prefix
#981
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## next #981 +/- ##
==========================================
+ Coverage 88.08% 88.15% +0.06%
==========================================
Files 128 128
Lines 23414 23442 +28
==========================================
+ Hits 20625 20665 +40
+ Misses 2789 2777 -12
|
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 looks correct but has more math than I'd like.
f4d4e26
to
d22b73c
Compare
#[inline] | ||
pub fn is_precompile(addr: &U256) -> bool { | ||
!addr.is_zero() && addr <= &Self::MAX_PRECOMPILE | ||
!addr.is_zero() && Self::lookup_precompile(&addr.to_bytes()).is_some() |
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.
We can probably drop the "is zero" check (or we can just leave it, doesn't really matter).
closes filecoin-project/ref-fvm#1164