fix trace returnValue
This commit is contained in:
parent
572de41507
commit
fe5ddf757b
|
@ -39,11 +39,6 @@ proc traceTransaction*(db: BaseChainDB, header: BlockHeader,
|
|||
result = vmState.getTracingResult()
|
||||
result["gas"] = %gasUsed
|
||||
|
||||
const returnValue = "returnValue"
|
||||
let j = result["structLogs"].elems[^1]
|
||||
if j.hasKey(returnValue):
|
||||
result[returnValue] = j[returnValue]
|
||||
|
||||
# now we dump captured state db
|
||||
if TracerFlags.DisableState notin tracerFlags:
|
||||
var n = newJObject()
|
||||
|
|
|
@ -58,7 +58,9 @@ proc traceOpCodeEnded*(tracer: var TransactionTracer, c: BaseComputation) =
|
|||
j["gasCost"] = %(tracer.gasRemaining - c.gasMeter.gasRemaining)
|
||||
|
||||
if c.lastOpCodeHasRetVal:
|
||||
j["returnValue"] = %("0x" & toHex(c.rawOutput, true))
|
||||
let returnValue = %("0x" & toHex(c.rawOutput, true))
|
||||
j["returnValue"] = returnValue
|
||||
tracer.trace["returnValue"] = returnValue
|
||||
|
||||
proc traceError*(tracer: var TransactionTracer, c: BaseComputation) =
|
||||
let j = tracer.trace["structLogs"].elems[^1]
|
||||
|
|
Loading…
Reference in New Issue