fixes from rebase
This commit is contained in:
parent
46151720f8
commit
75989342b0
|
@ -2,12 +2,6 @@ package core
|
|||
|
||||
import (
|
||||
rpc "github.com/tendermint/tendermint/rpc/lib/server"
|
||||
|
||||
data "github.com/tendermint/go-wire/data"
|
||||
ctypes "github.com/tendermint/tendermint/rpc/core/types"
|
||||
rpc "github.com/tendermint/tendermint/rpc/lib/server"
|
||||
"github.com/tendermint/tendermint/rpc/lib/types"
|
||||
"github.com/tendermint/tendermint/types"
|
||||
)
|
||||
|
||||
// TODO: better system than "unsafe" prefix
|
||||
|
|
|
@ -145,7 +145,7 @@ func mapParamsToArgs(rpcFunc *RPCFunc, params map[string]*json.RawMessage, argsO
|
|||
for i, argName := range rpcFunc.argNames {
|
||||
argType := rpcFunc.args[i+argsOffset]
|
||||
|
||||
if p, ok := params[argName]; ok && len(*p) > 0 {
|
||||
if p, ok := params[argName]; ok && p != nil && len(*p) > 0 {
|
||||
val := reflect.New(argType)
|
||||
err := json.Unmarshal(*p, val.Interface())
|
||||
if err != nil {
|
||||
|
|
|
@ -43,7 +43,7 @@ func testStatus(t *testing.T, client rpc.HTTPClient) {
|
|||
result := new(ctypes.ResultStatus)
|
||||
_, err := client.Call("status", map[string]interface{}{}, result)
|
||||
require.Nil(t, err)
|
||||
assert.Equal(t, moniker, status.NodeInfo.Moniker)
|
||||
assert.Equal(t, moniker, result.NodeInfo.Moniker)
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------
|
||||
|
@ -158,8 +158,9 @@ func TestURITx(t *testing.T) {
|
|||
testTx(t, GetURIClient(), true)
|
||||
|
||||
core.SetTxIndexer(&null.TxIndex{})
|
||||
testTx(t, GetJSONClient(), false)
|
||||
core.SetTxIndexer(node.ConsensusState().GetState().TxIndexer)
|
||||
defer core.SetTxIndexer(node.ConsensusState().GetState().TxIndexer)
|
||||
|
||||
testTx(t, GetURIClient(), false)
|
||||
}
|
||||
|
||||
func TestJSONTx(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue