Skip to content

Commit

Permalink
eth/tracers: regenerate assets + unexport test-struct + add testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Dec 21, 2020
1 parent c4e1371 commit f8173ab
Show file tree
Hide file tree
Showing 3 changed files with 135 additions and 82 deletions.
157 changes: 96 additions & 61 deletions eth/tracers/internal/tracers/assets.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions eth/tracers/tracer.go
Original file line number Diff line number Diff line change
Expand Up @@ -553,9 +553,9 @@ func (jst *Tracer) CaptureState(env *vm.EVM, pc uint64, op vm.OpCode, gas, cost
// Compute intrinsic gas
isHomestead := env.ChainConfig().IsHomestead(env.Context.BlockNumber)
isIstanbul := env.ChainConfig().IsIstanbul(env.Context.BlockNumber)
input, ok := jst.ctx["input"].([]byte)
if !ok {
return errors.New("Tracer received invalid input data")
var input []byte
if data, ok := jst.ctx["input"].([]byte); ok {
input = data
}
intrinsicGas, err := core.IntrinsicGas(input, jst.ctx["type"] == "CREATE", isHomestead, isIstanbul)
if err != nil {
Expand Down
Loading

0 comments on commit f8173ab

Please sign in to comment.