rpc: TMResult and TMEventData

This commit is contained in:
Ethan Buchman
2016-01-13 18:38:55 -05:00
parent 799efb0629
commit 3fdb4c03ab
7 changed files with 82 additions and 66 deletions

View File

@ -17,14 +17,12 @@ import (
"github.com/tendermint/go-p2p"
"github.com/tendermint/go-rpc"
"github.com/tendermint/go-rpc/server"
"github.com/tendermint/go-rpc/types"
"github.com/tendermint/go-wire"
bc "github.com/tendermint/tendermint/blockchain"
"github.com/tendermint/tendermint/consensus"
mempl "github.com/tendermint/tendermint/mempool"
"github.com/tendermint/tendermint/proxy"
"github.com/tendermint/tendermint/rpc/core"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
sm "github.com/tendermint/tendermint/state"
"github.com/tendermint/tendermint/types"
"github.com/tendermint/tmsp/example/golang"
@ -184,15 +182,6 @@ func (n *Node) StartRPC() (net.Listener, error) {
listenAddr := config.GetString("rpc_laddr")
// register the result objects with wire
// so consumers of tendermint rpc will not have
// conflicts with their own rpc
wire.RegisterInterface(
struct{ rpctypes.Result }{},
wire.ConcreteType{&events.EventResult{}, 0x1},
wire.ConcreteType{&ctypes.TendermintResult{}, 0x2},
)
mux := http.NewServeMux()
wm := rpcserver.NewWebsocketManager(core.Routes, n.evsw)
mux.HandleFunc("/websocket", wm.WebsocketHandler)