|
@ -7,7 +7,6 @@ import ( |
|
|
"github.com/stretchr/testify/assert" |
|
|
"github.com/stretchr/testify/assert" |
|
|
"github.com/stretchr/testify/require" |
|
|
"github.com/stretchr/testify/require" |
|
|
"github.com/tendermint/merkleeyes/iavl" |
|
|
"github.com/tendermint/merkleeyes/iavl" |
|
|
merktest "github.com/tendermint/merkleeyes/testutil" |
|
|
|
|
|
"github.com/tendermint/tendermint/rpc/client" |
|
|
"github.com/tendermint/tendermint/rpc/client" |
|
|
rpctest "github.com/tendermint/tendermint/rpc/test" |
|
|
rpctest "github.com/tendermint/tendermint/rpc/test" |
|
|
"github.com/tendermint/tendermint/types" |
|
|
"github.com/tendermint/tendermint/types" |
|
@ -49,7 +48,7 @@ func TestInfo(t *testing.T) { |
|
|
require.Nil(t, err, "%d: %+v", i, err) |
|
|
require.Nil(t, err, "%d: %+v", i, err) |
|
|
// TODO: this is not correct - fix merkleeyes!
|
|
|
// TODO: this is not correct - fix merkleeyes!
|
|
|
// assert.EqualValues(t, status.LatestBlockHeight, info.Response.LastBlockHeight)
|
|
|
// assert.EqualValues(t, status.LatestBlockHeight, info.Response.LastBlockHeight)
|
|
|
assert.True(t, strings.HasPrefix(info.Response.Data, "size")) |
|
|
|
|
|
|
|
|
assert.True(t, strings.Contains(info.Response.Data, "size")) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -115,7 +114,7 @@ func TestAppCalls(t *testing.T) { |
|
|
assert.NotNil(err) // no block yet
|
|
|
assert.NotNil(err) // no block yet
|
|
|
|
|
|
|
|
|
// write something
|
|
|
// write something
|
|
|
k, v, tx := merktest.MakeTxKV() |
|
|
|
|
|
|
|
|
k, v, tx := MakeTxKV() |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.True(bres.DeliverTx.Code.IsOK()) |
|
|
require.True(bres.DeliverTx.Code.IsOK()) |
|
@ -193,7 +192,7 @@ func TestBroadcastTxSync(t *testing.T) { |
|
|
initMempoolSize := mempool.Size() |
|
|
initMempoolSize := mempool.Size() |
|
|
|
|
|
|
|
|
for i, c := range GetClients() { |
|
|
for i, c := range GetClients() { |
|
|
_, _, tx := merktest.MakeTxKV() |
|
|
|
|
|
|
|
|
_, _, tx := MakeTxKV() |
|
|
bres, err := c.BroadcastTxSync(tx) |
|
|
bres, err := c.BroadcastTxSync(tx) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.True(bres.Code.IsOK()) |
|
|
require.True(bres.Code.IsOK()) |
|
@ -211,7 +210,7 @@ func TestBroadcastTxCommit(t *testing.T) { |
|
|
|
|
|
|
|
|
mempool := node.MempoolReactor().Mempool |
|
|
mempool := node.MempoolReactor().Mempool |
|
|
for i, c := range GetClients() { |
|
|
for i, c := range GetClients() { |
|
|
_, _, tx := merktest.MakeTxKV() |
|
|
|
|
|
|
|
|
_, _, tx := MakeTxKV() |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.Nil(err, "%d: %+v", i, err) |
|
|
require.True(bres.CheckTx.Code.IsOK()) |
|
|
require.True(bres.CheckTx.Code.IsOK()) |
|
@ -226,7 +225,7 @@ func TestTx(t *testing.T) { |
|
|
|
|
|
|
|
|
// first we broadcast a tx
|
|
|
// first we broadcast a tx
|
|
|
c := getHTTPClient() |
|
|
c := getHTTPClient() |
|
|
_, _, tx := merktest.MakeTxKV() |
|
|
|
|
|
|
|
|
_, _, tx := MakeTxKV() |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
bres, err := c.BroadcastTxCommit(tx) |
|
|
require.Nil(err, "%+v", err) |
|
|
require.Nil(err, "%+v", err) |
|
|
|
|
|
|
|
|