aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/vm.go
diff options
context:
space:
mode:
authorTyler Smith <[email protected]>2020-07-30 21:41:23 -0700
committerTyler Smith <[email protected]>2020-07-30 21:41:23 -0700
commitb974b98a356c7301de861136ae06c2955b655e3a (patch)
tree7066eafa0803dc07dab8525b95152182dc18a9cd /plugin/evm/vm.go
parent171d58d09fe67f89fb6ba9e32133427fa9794a39 (diff)
CLEANUP: Remove unused IP filter.
Diffstat (limited to 'plugin/evm/vm.go')
-rw-r--r--plugin/evm/vm.go19
1 files changed, 0 insertions, 19 deletions
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index d6a7415..c275286 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -10,8 +10,6 @@ import (
"errors"
"fmt"
"math/big"
- "net"
- "net/http"
"sync"
"sync/atomic"
"time"
@@ -358,23 +356,6 @@ func (vm *VM) LastAccepted() ids.ID {
return vm.lastAccepted.ID()
}
-type ipFilter struct {
- handler http.Handler
-}
-
-func (ipf ipFilter) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
- if ips, _, err := net.SplitHostPort(request.RemoteAddr); err == nil && ips == "127.0.0.1" {
- ipf.handler.ServeHTTP(writer, request)
- return
- }
- writer.WriteHeader(404)
- writer.Write([]byte("404 page not found\r\n"))
-}
-
-func newIPFilter(handler http.Handler) http.Handler {
- return ipFilter{handler}
-}
-
// CreateHandlers makes new http handlers that can handle API calls
func (vm *VM) CreateHandlers() map[string]*commonEng.HTTPHandler {
handler := vm.chain.NewRPCHandler()