Skip to content

Commit

Permalink
docs: add comment explaining an assert statement
Browse files Browse the repository at this point in the history
  • Loading branch information
samlaf committed Oct 19, 2024
1 parent 7b600a2 commit 5bb9efc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions api/clients/eigenda_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ func (m EigenDAClient) GetBlob(ctx context.Context, batchHeaderHash []byte, blob
}

if len(data) == 0 {
// TODO: explain when/why/how this can happen
return nil, fmt.Errorf("blob has length zero")
// This should never happen, because empty blobs are rejected from even entering the system:
// https://github.com/Layr-Labs/eigenda/blob/master/disperser/apiserver/server.go#L930
return nil, fmt.Errorf("blob has length zero - this should not be possible")
}

decodedData, err := m.Codec.DecodeBlob(data)
Expand Down

0 comments on commit 5bb9efc

Please sign in to comment.