Skip to content

Commit

Permalink
Prevent zero tracer from panic in edge cases (#1411)
Browse files Browse the repository at this point in the history
  • Loading branch information
cffls authored Nov 6, 2024
1 parent 8cc6d54 commit 1d05e31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eth/tracers/native/zero.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ func (t *zeroTracer) CaptureState(pc uint64, op vm.OpCode, gas, cost uint64, sco
slot := libcommon.Hash(stackData[stackLen-1].Bytes32())
t.addAccountToTrace(caller)
t.addSLOADToAccount(caller, slot)
case stackLen >= 1 && op == vm.SSTORE:
case stackLen >= 2 && op == vm.SSTORE:
slot := libcommon.Hash(stackData[stackLen-1].Bytes32())
t.addAccountToTrace(caller)
t.addSSTOREToAccount(caller, slot, stackData[stackLen-2].Clone())
Expand Down

0 comments on commit 1d05e31

Please sign in to comment.