Skip to content

Commit

Permalink
fix(blob/service): return error from GetProof if it appears (#3742)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed Sep 18, 2024
1 parent 62771f0 commit bb6b508
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
2 changes: 1 addition & 1 deletion blob/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ func (s *Service) GetProof(
}}

_, proof, err = s.retrieve(ctx, height, namespace, sharesParser)
return proof, nil
return proof, err
}

// GetAll returns all blobs under the given namespaces at the given height.
Expand Down
13 changes: 13 additions & 0 deletions blob/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,19 @@ func TestBlobService_Get(t *testing.T) {
assert.NoError(t, err)
},
},
{
name: "err during proof request",
doFn: func() (interface{}, error) {
proof, err := service.GetProof(ctx, 1,
blobsWithDiffNamespaces[0].Namespace(),
blobsWithDiffNamespaces[1].Commitment,
)
return proof, err
},
expectedResult: func(_ interface{}, err error) {
require.Error(t, err)
},
},
{
name: "marshal proof",
doFn: func() (interface{}, error) {
Expand Down

0 comments on commit bb6b508

Please sign in to comment.