Skip to content

Commit

Permalink
eth/tracers: fix create2-flaw in prestate_tracer
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Jan 3, 2019
1 parent 2b46018 commit 13d7634
Show file tree
Hide file tree
Showing 3 changed files with 98 additions and 14 deletions.
24 changes: 12 additions & 12 deletions eth/tracers/internal/tracers/assets.go

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

3 changes: 2 additions & 1 deletion eth/tracers/internal/tracers/prestate_tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@
// stack: salt, size, offset, endowment
var offset = log.stack.peek(1).valueOf()
var size = log.stack.peek(2).valueOf()
this.lookupAccount(toContract2(from, log.stack.peek(3).toString(16), log.memory.slice(offset, size)), db);
var end = offset + size
this.lookupAccount(toContract2(from, log.stack.peek(3).toString(16), log.memory.slice(offset, end)), db);
break;
case "CALL": case "CALLCODE": case "DELEGATECALL": case "STATICCALL":
this.lookupAccount(toAddress(log.stack.peek(1).toString(16)), db);
Expand Down
Loading

0 comments on commit 13d7634

Please sign in to comment.