From 59cf93f6819400db247e8b45ee518ee81c662c2c Mon Sep 17 00:00:00 2001 From: 0xEclair <38656355+0xEclair@users.noreply.github.com> Date: Wed, 17 Jul 2024 05:13:07 +0800 Subject: [PATCH] add test case --- rpc/grpc/grpc_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/rpc/grpc/grpc_test.go b/rpc/grpc/grpc_test.go index ba53cf2327..b57c7610f3 100644 --- a/rpc/grpc/grpc_test.go +++ b/rpc/grpc/grpc_test.go @@ -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) +}