RPCResponse.Result && EventData are registered interfaces; -skip_upnp option

This commit is contained in:
Jae Kwon
2015-08-10 20:38:45 -07:00
parent 65d40a2d08
commit 1b9fd811a1
60 changed files with 1468 additions and 1398 deletions

View File

@ -14,6 +14,7 @@ import (
"github.com/tendermint/tendermint/Godeps/_workspace/src/github.com/gorilla/websocket"
. "github.com/tendermint/tendermint/common"
"github.com/tendermint/tendermint/events"
ctypes "github.com/tendermint/tendermint/rpc/core/types"
. "github.com/tendermint/tendermint/rpc/types"
"github.com/tendermint/tendermint/wire"
)
@ -338,7 +339,7 @@ func (wsc *WSConnection) readRoutine() {
log.Notice("Subscribe to event", "id", wsc.id, "event", event)
wsc.evsw.AddListenerForEvent(wsc.id, event, func(msg interface{}) {
// NOTE: RPCResponses of subscribed events have id suffix "#event"
wsc.writeRPCResponse(NewRPCResponse(request.Id+"#event", RPCEventResult{event, msg}, ""))
wsc.writeRPCResponse(NewRPCResponse(request.Id+"#event", ctypes.ResultEvent{event, msg}, ""))
})
continue
}