diff --git a/core/vm/logger.go b/core/vm/logger.go index 5731c882d3c5..6dabe19a43c7 100644 --- a/core/vm/logger.go +++ b/core/vm/logger.go @@ -277,7 +277,7 @@ func (l *StructLogger) CaptureState(pc uint64, op OpCode, gas, cost uint64, scop } // in reality it is impossible for CREATE to trigger ErrContractAddressCollision - if op == CREATE2 && stack.len() >= 4 { + if op == CREATE2 && opErr == nil { _ = stack.data[stack.len()-1] // value offset := stack.data[stack.len()-2] size := stack.data[stack.len()-3]