From f35aa48126b8b17077f8811d8fe8ac166a784bd7 Mon Sep 17 00:00:00 2001 From: billettc Date: Fri, 2 Feb 2024 09:06:30 -0500 Subject: [PATCH] fix rpc error handling --- block/fetcher/rpc.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/block/fetcher/rpc.go b/block/fetcher/rpc.go index 7ab54936..d9c1c517 100644 --- a/block/fetcher/rpc.go +++ b/block/fetcher/rpc.go @@ -137,9 +137,7 @@ func (f *RPCFetcher) fetch(ctx context.Context, requestedSlot uint64) (*rpc.GetB return nil } } - } - if out == nil { - panic("out is nil and innerErr is nil. This should not happen.") + return fmt.Errorf("getting block %d from rpcClient: %w", requestedSlot, innerErr) } return nil })