Skip to content

Commit

Permalink
eth/tracers: always pop precompiles stack in callTracer (#11004) (#11024
Browse files Browse the repository at this point in the history
)

cherry pick: 1a050db
for E3

---

made a mistake in previous PR
#11022
should always pop the precompiles stack for correctness
  • Loading branch information
taratorio authored Jul 4, 2024
1 parent 2711926 commit cfb55a3
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions eth/tracers/native/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,13 @@ func (t *callTracer) CaptureExit(output []byte, gasUsed uint64, err error) {
return
}
precompilesLastIdx := len(t.precompiles) - 1
if !t.config.IncludePrecompiles && precompilesLastIdx > -1 && t.precompiles[precompilesLastIdx] {
t.precompiles = t.precompiles[:precompilesLastIdx]
if precompilesLastIdx < 0 {
return
}
// pop precompile
precompile := t.precompiles[precompilesLastIdx]
t.precompiles = t.precompiles[:precompilesLastIdx]
if precompile && !t.config.IncludePrecompiles {
return
}
// pop call
Expand Down

0 comments on commit cfb55a3

Please sign in to comment.