ethermint
ethermint copied to clipboard
fix: skip codehash check when the code has been deleted in the evm state
Closes: #1319
just ignores the codehash check when the evm account code is empty.
For contributor use:
- [x] Targeted PR against correct branch (see CONTRIBUTING.md)
- [x] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [x] Code follows the module structure standards.
- [x] Wrote unit and integration tests
- [x] Updated relevant documentation (
docs/
) or specification (x/<module>/spec/
) - [x] Added relevant
godoc
comments. - [x] Added a relevant changelog entry to the
Unreleased
section inCHANGELOG.md
- [x] Re-reviewed
Files changed
in the Github PR explorer
For admin use:
- [ ] Added appropriate labels to PR (ex.
WIP
,R4R
,docs
, etc) - [ ] Reviewers assigned
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)
Codecov Report
Merging #1320 (6523d81) into main (236ca33) will increase coverage by
0.01%
. The diff coverage is100.00%
.
Additional details and impacted files
@@ Coverage Diff @@
## main #1320 +/- ##
==========================================
+ Coverage 55.86% 55.88% +0.01%
==========================================
Files 108 108
Lines 10017 10021 +4
==========================================
+ Hits 5596 5600 +4
Misses 4140 4140
Partials 281 281
Impacted Files | Coverage Δ | |
---|---|---|
x/evm/genesis.go | 56.66% <100.00%> (+3.09%) |
:arrow_up: |
there seems to be conflicts with main?
LGTM, can we merge this now @fedekunze ?
@yihuang isn't the test with empty code hash still missing?
emptyCodeHash := crypto.Keccak256(nil)
codeHash := common.BytesToHash(emptyCodeHash).String()
@yihuang isn't the test with empty code hash still missing?
emptyCodeHash := crypto.Keccak256(nil) codeHash := common.BytesToHash(emptyCodeHash).String()
Which specific case do you have in mind, the default account has the empty code hash, so the previous test cases tested that.