From 3b038f6a25132291b4fe1a6bdc1e79d9fb9a0ce5 Mon Sep 17 00:00:00 2001 From: bros Date: Fri, 2 Feb 2024 10:27:51 +0000 Subject: [PATCH] debug unexpected zkevm client situation --- jsonrpc/client/zkevm.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/jsonrpc/client/zkevm.go b/jsonrpc/client/zkevm.go index f2e78aa4af..ef2ecacaca 100644 --- a/jsonrpc/client/zkevm.go +++ b/jsonrpc/client/zkevm.go @@ -50,6 +50,9 @@ func (c *Client) BatchByNumber(ctx context.Context, number *big.Int) (*types.Bat if err != nil { return nil, err } + if result == nil { + return nil, fmt.Errorf("unesxpected error, couldn't get batch from RPC, but it didn't return error. RPC response: %+v", response) + } return result, nil }