-
Notifications
You must be signed in to change notification settings - Fork 161
Conversation
Codecov Report
@@ Coverage Diff @@
## evm-params #493 +/- ##
==============================================
- Coverage 71.33% 71.15% -0.18%
==============================================
Files 40 40
Lines 2637 2638 +1
==============================================
- Hits 1881 1877 -4
- Misses 621 625 +4
- Partials 135 136 +1
Continue to review full report at Codecov.
|
x/evm/types/statedb.go
Outdated
} | ||
} | ||
|
||
// Above, we don't copy the actual journal. This means that if the copy is | ||
// copied, the loop above will be a no-op, since the copy's journal is empty. | ||
// Thus, here we iterate over stateObjects, to enable copies of copies. | ||
for addr := range csdb.stateObjectsDirty { | ||
if idx, exist := state.addressToObjectIndex[addr]; !exist { | ||
if idx, exist := state.addressToObjectIndex[addr]; exist { |
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 think this should be !exist
?
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 think so but we are using idx
in the line right after, which is bad if it doesn't exist
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.
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 see, will update!
state.stateObjectsDirty[dirty.address] = struct{}{} | ||
}) | ||
delete(state.stateObjectsDirty, dirty.address) | ||
state.addressToObjectIndex[dirty.address] = len(state.stateObjects) - 1 |
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 the fix, right?
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.
unfortunately not, the fix seemed to be idx < len(csdb.stateObjects)
inside getStateObject
and setStateObject
which I don't really like...
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.
utACK. Will look into the other test failures tomorrow
* evm: params * setup * bump commit * fixes * increase gas usage * tests * evm denom param * more config updates * update genesis * update ante handler * csdb param test * more tests and fixes * update statedb.Copy * lint * additional test * fix importer tests * fix AnteHandler test * minor update * revert * undo gas update * stringer test * changelog * fix csdb index error (#493) * attempt to fix * cleanup * add idx check * update csdb.Copy * update default hash * update querier * update rpc tests * fix estimate gas test Co-authored-by: noot <36753753+noot@users.noreply.github.com> Co-authored-by: noot <elizabethjbinks@gmail.com>
Closes: #491
Description
For contributor use:
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerFor admin use:
WIP
,R4R
,docs
, etc)