|
|
@ -499,10 +499,10 @@ func (n *Node) startRPC() ([]net.Listener, error) { |
|
|
|
for i, listenAddr := range listenAddrs { |
|
|
|
mux := http.NewServeMux() |
|
|
|
rpcLogger := n.Logger.With("module", "rpc-server") |
|
|
|
wm := rpcserver.NewWebsocketManager(rpccore.Routes, rpcserver.EventSubscriber(n.eventBus)) |
|
|
|
wm := rpcserver.NewWebsocketManager(rpccore.Routes, rpccore.RoutesCodec, rpcserver.EventSubscriber(n.eventBus)) |
|
|
|
wm.SetLogger(rpcLogger.With("protocol", "websocket")) |
|
|
|
mux.HandleFunc("/websocket", wm.WebsocketHandler) |
|
|
|
rpcserver.RegisterRPCFuncs(mux, rpccore.Routes, rpcLogger) |
|
|
|
rpcserver.RegisterRPCFuncs(mux, rpccore.Routes, rpccore.RoutesCodec, rpcLogger) |
|
|
|
listener, err := rpcserver.StartHTTPServer(listenAddr, mux, rpcLogger) |
|
|
|
if err != nil { |
|
|
|
return nil, err |
|
|
|