internal/debug, internal/ethapi, rpc, swarm/storage: Ran "go fmt"

This commit is contained in:
Kenji Siu 2016-11-01 17:23:24 +08:00
parent 4dc1fb923a
commit d85d3c74db
4 changed files with 24 additions and 25 deletions

View File

@ -53,7 +53,7 @@ var (
Value: 6060, Value: 6060,
} }
pprofAddrFlag = cli.StringFlag{ pprofAddrFlag = cli.StringFlag{
Name: "pprofaddr", Name: "pprofaddr",
Usage: "pprof HTTP server listening interface", Usage: "pprof HTTP server listening interface",
Value: "127.0.0.1", Value: "127.0.0.1",
} }

View File

@ -167,17 +167,17 @@ func (dw *dbWrapper) toValue(vm *otto.Otto) otto.Value {
// JavascriptTracer provides an implementation of Tracer that evaluates a // JavascriptTracer provides an implementation of Tracer that evaluates a
// Javascript function for each VM execution step. // Javascript function for each VM execution step.
type JavascriptTracer struct { type JavascriptTracer struct {
vm *otto.Otto // Javascript VM instance vm *otto.Otto // Javascript VM instance
traceobj *otto.Object // User-supplied object to call traceobj *otto.Object // User-supplied object to call
log map[string]interface{} // (Reusable) map for the `log` arg to `step` log map[string]interface{} // (Reusable) map for the `log` arg to `step`
logvalue otto.Value // JS view of `log` logvalue otto.Value // JS view of `log`
memory *memoryWrapper // Wrapper around the VM memory memory *memoryWrapper // Wrapper around the VM memory
memvalue otto.Value // JS view of `memory` memvalue otto.Value // JS view of `memory`
stack *stackWrapper // Wrapper around the VM stack stack *stackWrapper // Wrapper around the VM stack
stackvalue otto.Value // JS view of `stack` stackvalue otto.Value // JS view of `stack`
db *dbWrapper // Wrapper around the VM environment db *dbWrapper // Wrapper around the VM environment
dbvalue otto.Value // JS view of `db` dbvalue otto.Value // JS view of `db`
err error // Error, if one has occurred err error // Error, if one has occurred
} }
// NewJavascriptTracer instantiates a new JavascriptTracer instance. // NewJavascriptTracer instantiates a new JavascriptTracer instance.
@ -222,17 +222,17 @@ func NewJavascriptTracer(code string) (*JavascriptTracer, error) {
db := &dbWrapper{} db := &dbWrapper{}
return &JavascriptTracer{ return &JavascriptTracer{
vm: vm, vm: vm,
traceobj: jstracer, traceobj: jstracer,
log: log, log: log,
logvalue: logvalue, logvalue: logvalue,
memory: mem, memory: mem,
memvalue: mem.toValue(vm), memvalue: mem.toValue(vm),
stack: stack, stack: stack,
stackvalue: stack.toValue(vm), stackvalue: stack.toValue(vm),
db: db, db: db,
dbvalue: db.toValue(vm), dbvalue: db.toValue(vm),
err: nil, err: nil,
}, nil }, nil
} }

View File

@ -170,7 +170,7 @@ func newCorsHandler(srv *Server, corsString string) http.Handler {
c := cors.New(cors.Options{ c := cors.New(cors.Options{
AllowedOrigins: allowedOrigins, AllowedOrigins: allowedOrigins,
AllowedMethods: []string{"POST", "GET"}, AllowedMethods: []string{"POST", "GET"},
MaxAge: 600, MaxAge: 600,
}) })
return c.Handler(srv) return c.Handler(srv)
} }

View File

@ -28,7 +28,6 @@ import (
"time" "time"
) )
/* /*
Tests TreeChunker by splitting and joining a random byte slice Tests TreeChunker by splitting and joining a random byte slice
*/ */