aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Buttolph <[email protected]>2020-06-07 21:27:09 +0000
committerStephen Buttolph <[email protected]>2020-06-07 21:27:09 +0000
commit298d08dbf8b74a32f7bb74e25cc5bf729c35a6da (patch)
tree241926e99f3c9ad0c5c7a1b8d2c02517ecc3bdc6
parentab977c426fe8021275fc1c7fd6cdb80d42191886 (diff)
fix minor typo
-rw-r--r--coreth.go2
-rw-r--r--plugin/evm/vm.go3
2 files changed, 3 insertions, 2 deletions
diff --git a/coreth.go b/coreth.go
index 019f480..06399b9 100644
--- a/coreth.go
+++ b/coreth.go
@@ -90,7 +90,7 @@ func (self *ETHChain) PendingSize() (int, error) {
}
func (self *ETHChain) AddRemoteTxs(txs []*types.Transaction) []error {
- return self.backend.TxPool().AddRemotesSync(txs)
+ return self.backend.TxPool().AddRemotes(txs)
}
func (self *ETHChain) AddLocalTxs(txs []*types.Transaction) []error {
diff --git a/plugin/evm/vm.go b/plugin/evm/vm.go
index 57b2eda..929725d 100644
--- a/plugin/evm/vm.go
+++ b/plugin/evm/vm.go
@@ -334,11 +334,12 @@ type ipFilter struct {
}
func (ipf ipFilter) ServeHTTP(writer http.ResponseWriter, request *http.Request) {
- if ips, _, err := net.SplitHostPort(request.RemoteAddr); err != nil && ips == "127.0.0.1" {
+ 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"))
}
func newIPFilter(handler http.Handler) http.Handler {