rpc: return (*Response, error) for all functions

This commit is contained in:
Ethan Buchman
2015-03-28 23:10:05 -07:00
parent d30fc2fa43
commit 731de7a6aa
11 changed files with 58 additions and 49 deletions

View File

@ -8,7 +8,7 @@ import (
"github.com/tendermint/tendermint/binary"
"github.com/tendermint/tendermint/config"
"github.com/tendermint/tendermint/merkle"
"github.com/tendermint/tendermint/rpc"
"github.com/tendermint/tendermint/rpc/core"
"github.com/tendermint/tendermint/types"
"io/ioutil"
"net/http"
@ -28,7 +28,7 @@ func TestHTTPStatus(t *testing.T) {
}
var status struct {
Status string
Data rpc.ResponseStatus
Data core.ResponseStatus
Error string
}
err = json.Unmarshal(body, &status)
@ -56,7 +56,7 @@ func TestHTTPGenPriv(t *testing.T) {
}
var status struct {
Status string
Data rpc.ResponseGenPrivAccount
Data core.ResponseGenPrivAccount
Error string
}
binary.ReadJSON(&status, body, &err)
@ -118,7 +118,7 @@ func TestHTTPBroadcastTx(t *testing.T) {
var status struct {
Status string
Data rpc.ResponseBroadcastTx
Data core.ResponseBroadcastTx
Error string
}
requestResponse(t, "broadcast_tx", url.Values{"tx": {string(b)}}, &status)