-
Notifications
You must be signed in to change notification settings - Fork 179
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] Add EVM type ID #5091
[EVM] Add EVM type ID #5091
Conversation
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.
Nice!
}) | ||
} | ||
|
||
func init() { |
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.
I don't like using init but not sure if there's a better way of doing this without exporting types.
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.
Looks like these are usually in init... Not sure if there is another way.
}) | ||
} | ||
|
||
func init() { |
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.
Looks like these are usually in init... Not sure if there is another way.
func init() { | ||
common.RegisterTypeIDDecoder( | ||
evmLocationPrefix, | ||
func(_ common.MemoryGauge, typeID string) (common.Location, string, error) { |
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.
Do we need a test for this part specifically?
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 is covered in the test I wrote, however edge cases with errors are not.
# Conflicts: # fvm/fvm_test.go
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## master #5091 +/- ##
===========================================
- Coverage 69.95% 56.26% -13.69%
===========================================
Files 19 987 +968
Lines 1115 94142 +93027
===========================================
+ Hits 780 52970 +52190
- Misses 311 37223 +36912
- Partials 24 3949 +3925
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Closes: #5232
This PR adds a new type ID for EVM which can be used in events.
evm.BlockExecuted
andevm.TransactionExecuted