eth/tracers: fix
This commit is contained in:
		| @@ -19,7 +19,7 @@ func init() { | ||||
| type CallFrame struct { | ||||
| 	Type    string      `json:"type"` | ||||
| 	From    string      `json:"from"` | ||||
| 	To      string      `json:"to"` | ||||
| 	To      string      `json:"to,omitempty"` | ||||
| 	Value   string      `json:"value,omitempty"` | ||||
| 	Gas     string      `json:"gas"` | ||||
| 	GasUsed string      `json:"gasUsed"` | ||||
| @@ -82,7 +82,9 @@ func (t *CallTracer) CaptureEnter(typ vm.OpCode, from common.Address, to common. | ||||
|  | ||||
| func (t *CallTracer) CaptureExit(output []byte, gasUsed uint64, err error) { | ||||
| 	size := len(t.callstack) | ||||
| 	if size > 1 { | ||||
| 	if size <= 1 { | ||||
| 		return | ||||
| 	} | ||||
| 	// pop call | ||||
| 	call := t.callstack[size-1] | ||||
| 	t.callstack = t.callstack[:size-1] | ||||
| @@ -98,7 +100,6 @@ func (t *CallTracer) CaptureExit(output []byte, gasUsed uint64, err error) { | ||||
| 		} | ||||
| 	} | ||||
| 	t.callstack[size-1].Calls = append(t.callstack[size-1].Calls, call) | ||||
| 	} | ||||
| } | ||||
|  | ||||
| func (t *CallTracer) GetResult() (json.RawMessage, error) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user