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

@ -9,6 +9,7 @@ import (
"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"
@ -39,7 +40,7 @@ func TestJSONStatus(t *testing.T) {
}
status := new(struct {
Status string
Data rpc.ResponseStatus
Data core.ResponseStatus
Error string
})
err = json.Unmarshal(body, status)
@ -77,7 +78,7 @@ func TestJSONGenPriv(t *testing.T) {
}
var status struct {
Status string
Data rpc.ResponseGenPrivAccount
Data core.ResponseGenPrivAccount
Error string
}
binary.ReadJSON(&status, body, &err)
@ -139,7 +140,7 @@ func TestJSONBroadcastTx(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)