Skip to content

Commit

Permalink
fix rpc error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Feb 2, 2024
1 parent 6203d68 commit f35aa48
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions block/fetcher/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
})
Expand Down

0 comments on commit f35aa48

Please sign in to comment.