diff options
Diffstat (limited to 'data/transactions/logic/debugger.go')
-rw-r--r-- | data/transactions/logic/debugger.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/data/transactions/logic/debugger.go b/data/transactions/logic/debugger.go index b591aad01..f90e7b3f3 100644 --- a/data/transactions/logic/debugger.go +++ b/data/transactions/logic/debugger.go @@ -76,7 +76,7 @@ type DebugState struct { Error string `codec:"error"` // global/local state changes are updated every step. Stateful TEAL only. - basics.EvalDelta + transactions.EvalDelta } // GetProgramID returns program or execution ID that is string representation of sha256 checksum. @@ -86,8 +86,8 @@ func GetProgramID(program []byte) string { return hex.EncodeToString(hash[:]) } -func makeDebugState(cx *evalContext) DebugState { - disasm, dsInfo, err := disassembleInstrumented(cx.program) +func makeDebugState(cx *EvalContext) DebugState { + disasm, dsInfo, err := disassembleInstrumented(cx.program, nil) if err != nil { // Report disassembly error as program text disasm = err.Error() @@ -98,7 +98,7 @@ func makeDebugState(cx *evalContext) DebugState { ExecID: GetProgramID(cx.program), Disassembly: disasm, PCOffset: dsInfo.pcOffset, - GroupIndex: cx.GroupIndex, + GroupIndex: int(cx.GroupIndex), TxnGroup: cx.TxnGroup, Proto: cx.Proto, } @@ -194,7 +194,7 @@ func valueDeltaToValueDelta(vd *basics.ValueDelta) basics.ValueDelta { } } -func (cx *evalContext) refreshDebugState() *DebugState { +func (cx *EvalContext) refreshDebugState() *DebugState { ds := &cx.debugState // Update pc, line, error, stack, and scratch space @@ -204,12 +204,12 @@ func (cx *evalContext) refreshDebugState() *DebugState { ds.Error = cx.err.Error() } - stack := make([]basics.TealValue, len(cx.stack), len(cx.stack)) + stack := make([]basics.TealValue, len(cx.stack)) for i, sv := range cx.stack { stack[i] = stackValueToTealValue(&sv) } - scratch := make([]basics.TealValue, len(cx.scratch), len(cx.scratch)) + scratch := make([]basics.TealValue, len(cx.scratch)) for i, sv := range cx.scratch { scratch[i] = stackValueToTealValue(&sv) } |