Merge branch 'rpc_jae' into develop

Conflicts:
	node/node.go
	rpc/core/accounts.go
	rpc/core_client/client.go
	rpc/handlers.go
	rpc/http_server.go
	rpc/test/helpers.go
	rpc/test/http_rpc_test.go
	rpc/test/json_rpc_test.go
This commit is contained in:
Jae Kwon
2015-04-08 14:27:03 -07:00
20 changed files with 892 additions and 657 deletions

View File

@ -10,12 +10,16 @@ import (
"github.com/tendermint/tendermint/binary"
. "github.com/tendermint/tendermint/common"
"github.com/tendermint/tendermint/events"
)
func StartHTTPServer(listenAddr string, funcMap map[string]*RPCFunc) {
func StartHTTPServer(listenAddr string, funcMap map[string]*RPCFunc, evsw *events.EventSwitch) {
log.Info(Fmt("Starting RPC HTTP server on %s", listenAddr))
mux := http.NewServeMux()
RegisterRPCFuncs(mux, funcMap)
if evsw != nil {
RegisterEventsHandler(mux, evsw)
}
go func() {
res := http.ListenAndServe(
listenAddr,