aboutsummaryrefslogtreecommitdiffstats
path: root/rpc
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-02-04 07:18:20 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-02-04 07:18:20 +0800
commit07590196a5ee1a63856f1653516da950dfa4966b (patch)
tree59803378ea0fd080bc78bf7bef0d9501938b6135 /rpc
parent4dc283c0fb5d886ce8d3638c3322af7e6f2a3b2e (diff)
parentb2b42f759c54d9d1b0ba4d9419a4c9a4bd8e4234 (diff)
downloaddexon-07590196a5ee1a63856f1653516da950dfa4966b.tar
dexon-07590196a5ee1a63856f1653516da950dfa4966b.tar.gz
dexon-07590196a5ee1a63856f1653516da950dfa4966b.tar.bz2
dexon-07590196a5ee1a63856f1653516da950dfa4966b.tar.lz
dexon-07590196a5ee1a63856f1653516da950dfa4966b.tar.xz
dexon-07590196a5ee1a63856f1653516da950dfa4966b.tar.zst
dexon-07590196a5ee1a63856f1653516da950dfa4966b.zip
Merge branch 'develop' of github.com:tgerring/go-ethereum into develop
Diffstat (limited to 'rpc')
-rw-r--r--rpc/util.go5
-rw-r--r--rpc/ws/server.go22
2 files changed, 11 insertions, 16 deletions
diff --git a/rpc/util.go b/rpc/util.go
index bb4087c51..509d9a17d 100644
--- a/rpc/util.go
+++ b/rpc/util.go
@@ -18,10 +18,11 @@ package rpc
import (
"encoding/json"
- "github.com/ethereum/go-ethereum/logger"
"io"
"net/http"
+
"github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/state"
)
@@ -36,7 +37,7 @@ func (self JsonWrapper) Send(writer io.Writer, v interface{}) (n int, err error)
rpclogger.Fatalln("Error marshalling JSON", err)
return 0, err
}
- rpclogger.Infof("Sending payload: %s", payload)
+ rpclogger.DebugDetailf("Sending payload: %s", payload)
return writer.Write(payload)
}
diff --git a/rpc/ws/server.go b/rpc/ws/server.go
index 2853181ec..85cacf80b 100644
--- a/rpc/ws/server.go
+++ b/rpc/ws/server.go
@@ -22,8 +22,6 @@ import (
"net/http"
"code.google.com/p/go.net/websocket"
- "github.com/ethereum/go-ethereum/eth"
- "github.com/ethereum/go-ethereum/event/filter"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/xeth"
@@ -32,25 +30,21 @@ import (
var wslogger = logger.NewLogger("RPC-WS")
type WebSocketServer struct {
- eth *eth.Ethereum
- filterManager *filter.FilterManager
- port int
- doneCh chan bool
- listener net.Listener
+ pipe *xeth.XEth
+ port int
+ doneCh chan bool
+ listener net.Listener
}
-func NewWebSocketServer(eth *eth.Ethereum, port int) (*WebSocketServer, error) {
+func NewWebSocketServer(pipe *xeth.XEth, port int) (*WebSocketServer, error) {
sport := fmt.Sprintf(":%d", port)
l, err := net.Listen("tcp", sport)
if err != nil {
return nil, err
}
- filterManager := filter.NewFilterManager(eth.EventMux())
- go filterManager.Start()
-
- return &WebSocketServer{eth,
- filterManager,
+ return &WebSocketServer{
+ pipe,
port,
make(chan bool),
l,
@@ -75,7 +69,7 @@ func (self *WebSocketServer) Start() {
wslogger.Infof("Starting RPC-WS server on port %d", self.port)
go self.handlerLoop()
- api := rpc.NewEthereumApi(xeth.New(self.eth))
+ api := rpc.NewEthereumApi(self.pipe)
h := self.apiHandler(api)
http.Handle("/ws", h)