mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-14 13:51:21 +00:00
use TendermintResult for rpctypes.Result
This commit is contained in:
10
node/node.go
10
node/node.go
@ -16,12 +16,14 @@ 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"
|
||||
@ -181,6 +183,14 @@ 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{&ctypes.TendermintResult{}, 0x1},
|
||||
)
|
||||
|
||||
mux := http.NewServeMux()
|
||||
wm := rpcserver.NewWebsocketManager(core.Routes, n.evsw)
|
||||
mux.HandleFunc("/websocket", wm.WebsocketHandler)
|
||||
|
Reference in New Issue
Block a user