eth/tracers: fix callTracer fault handling (#23667)

* eth/tracers: fix calltracer fault handling

* eth/tracers: fix calltracer indentation
This commit is contained in:
Sina Mahmoodi 2021-10-01 13:03:24 +02:00 committed by GitHub
parent a47b8cf6f5
commit b522f5e091
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 64 additions and 76 deletions

File diff suppressed because one or more lines are too long

View File

@ -19,16 +19,7 @@
// about internal messages of a transaction. // about internal messages of a transaction.
{ {
callstack: [{}], callstack: [{}],
fault: function(log, db) { fault: function(log, db) {},
var len = this.callstack.length
if (len > 1) {
var call = this.callstack.pop()
if (this.callstack[len-1].calls === undefined) {
this.callstack[len-1].calls = []
}
this.callstack[len-1].calls.push(call)
}
},
result: function(ctx, db) { result: function(ctx, db) {
// Prepare outer message info // Prepare outer message info
var result = { var result = {

View File

@ -795,9 +795,6 @@ func (jst *Tracer) CaptureExit(output []byte, gasUsed uint64, err error) {
if !jst.traceCallFrames { if !jst.traceCallFrames {
return return
} }
if jst.err != nil {
return
}
// If tracing was interrupted, set the error and stop // If tracing was interrupted, set the error and stop
if atomic.LoadUint32(&jst.interrupt) > 0 { if atomic.LoadUint32(&jst.interrupt) > 0 {
jst.err = jst.reason jst.err = jst.reason