aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugin/evm/vm.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index c10e2b9..57b2eda 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -338,11 +338,11 @@ func (ipf ipFilter) ServeHTTP(writer http.ResponseWriter, request *http.Request)
ipf.handler.ServeHTTP(writer, request)
return
}
- writer.WriterHeader(404)
+ writer.WriteHeader(404)
}
-func NewIPFilter(handler http.Handler) {
- ipFilter{handler}
+func newIPFilter(handler http.Handler) http.Handler {
+ return ipFilter{handler}
}
// CreateHandlers makes new http handlers that can handle API calls
@@ -355,8 +355,8 @@ func (vm *VM) CreateHandlers() map[string]*commonEng.HTTPHandler {
handler.RegisterName("debug", &DebugAPI{vm})
return map[string]*commonEng.HTTPHandler{
- "/rpc": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: NewIPFilter(handler)},
- "/ws": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: NewIPFilter(handler.WebsocketHandler([]string{"*"}))},
+ "/rpc": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: newIPFilter(handler)},
+ "/ws": &commonEng.HTTPHandler{LockOptions: commonEng.NoLock, Handler: newIPFilter(handler.WebsocketHandler([]string{"*"}))},
}
}