Remove unwanted wrapper of GRPC status error (#11486)

Co-authored-by: prestonvanloon <preston@prysmaticlabs.com>
Co-authored-by: Radosław Kapka <rkapka@wp.pl>
This commit is contained in:
Yier 2022-09-23 22:37:30 +08:00 committed by GitHub
parent 7720d98764
commit 2ea66a8467
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -100,7 +100,7 @@ func (bs *Server) GetBlockHeader(ctx context.Context, req *ethpbv1.BlockRequest)
blk, err := bs.blockFromBlockID(ctx, req.BlockId) blk, err := bs.blockFromBlockID(ctx, req.BlockId)
err = handleGetBlockError(blk, err) err = handleGetBlockError(blk, err)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "GetBlockHeader") return nil, err
} }
v1alpha1Header, err := blk.Header() v1alpha1Header, err := blk.Header()
if err != nil { if err != nil {
@ -371,7 +371,7 @@ func (bs *Server) GetBlock(ctx context.Context, req *ethpbv1.BlockRequest) (*eth
blk, err := bs.blockFromBlockID(ctx, req.BlockId) blk, err := bs.blockFromBlockID(ctx, req.BlockId)
err = handleGetBlockError(blk, err) err = handleGetBlockError(blk, err)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "GetBlock") return nil, err
} }
signedBeaconBlock, err := migration.SignedBeaconBlock(blk) signedBeaconBlock, err := migration.SignedBeaconBlock(blk)
if err != nil { if err != nil {
@ -394,7 +394,7 @@ func (bs *Server) GetBlockSSZ(ctx context.Context, req *ethpbv1.BlockRequest) (*
blk, err := bs.blockFromBlockID(ctx, req.BlockId) blk, err := bs.blockFromBlockID(ctx, req.BlockId)
err = handleGetBlockError(blk, err) err = handleGetBlockError(blk, err)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "GetBlockSSZ") return nil, err
} }
signedBeaconBlock, err := migration.SignedBeaconBlock(blk) signedBeaconBlock, err := migration.SignedBeaconBlock(blk)
if err != nil { if err != nil {
@ -416,7 +416,7 @@ func (bs *Server) GetBlockV2(ctx context.Context, req *ethpbv2.BlockRequestV2) (
blk, err := bs.blockFromBlockID(ctx, req.BlockId) blk, err := bs.blockFromBlockID(ctx, req.BlockId)
err = handleGetBlockError(blk, err) err = handleGetBlockError(blk, err)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "GetBlockV2") return nil, err
} }
_, err = blk.PbPhase0Block() _, err = blk.PbPhase0Block()
@ -541,7 +541,7 @@ func (bs *Server) GetBlockSSZV2(ctx context.Context, req *ethpbv2.BlockRequestV2
blk, err := bs.blockFromBlockID(ctx, req.BlockId) blk, err := bs.blockFromBlockID(ctx, req.BlockId)
err = handleGetBlockError(blk, err) err = handleGetBlockError(blk, err)
if err != nil { if err != nil {
return nil, errors.Wrap(err, "GetBlockSSZV2") return nil, err
} }
_, err = blk.PbPhase0Block() _, err = blk.PbPhase0Block()