Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Eoous committed Jul 16, 2024
1 parent 8f778eb commit 59cf93f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions rpc/grpc/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,12 @@ func TestBroadcastTx(t *testing.T) {
require.EqualValues(t, 0, res.CheckTx.Code)
require.EqualValues(t, 0, res.DeliverTx.Code)
}

func TestBlockByHash(t *testing.T) {
res, err := rpctest.GetGRPCClient().BlockByHash(
context.Background(),
&core_grpc.RequestBlockByHash{Hash: []byte("this is a block hash")},
)
require.Error(t, err)
require.Nil(t, res)
}

0 comments on commit 59cf93f

Please sign in to comment.