mirror of
https://github.com/status-im/nimbus-eth1.git
synced 2025-01-13 13:55:45 +00:00
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 = vmState.getTracingResult()
|
||||||
result["gas"] = %gasUsed
|
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
|
# now we dump captured state db
|
||||||
if TracerFlags.DisableState notin tracerFlags:
|
if TracerFlags.DisableState notin tracerFlags:
|
||||||
var n = newJObject()
|
var n = newJObject()
|
||||||
|
@ -58,7 +58,9 @@ proc traceOpCodeEnded*(tracer: var TransactionTracer, c: BaseComputation) =
|
|||||||
j["gasCost"] = %(tracer.gasRemaining - c.gasMeter.gasRemaining)
|
j["gasCost"] = %(tracer.gasRemaining - c.gasMeter.gasRemaining)
|
||||||
|
|
||||||
if c.lastOpCodeHasRetVal:
|
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) =
|
proc traceError*(tracer: var TransactionTracer, c: BaseComputation) =
|
||||||
let j = tracer.trace["structLogs"].elems[^1]
|
let j = tracer.trace["structLogs"].elems[^1]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user