Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
nit: inline; GetIDs ns
Browse files Browse the repository at this point in the history
  • Loading branch information
tuxcanfly committed Feb 12, 2024
1 parent 8c4a8c9 commit 6533c4e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions celestia/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ func (c *CelestiaDA) Get(ctx context.Context, ids []da.ID, ns da.Namespace) ([]d

// GetIDs returns IDs of all Blobs located in DA at given height.
func (c *CelestiaDA) GetIDs(ctx context.Context, height uint64, ns da.Namespace) ([]da.ID, error) {
if ns == nil {
ns = c.namespace
}

Check warning on line 73 in celestia/celestia.go

View check run for this annotation

Codecov / codecov/patch

celestia/celestia.go#L72-L73

Added lines #L72 - L73 were not covered by tests
var ids []da.ID
blobs, err := c.client.Blob.GetAll(ctx, height, []share.Namespace{ns})
if err != nil {
Expand Down Expand Up @@ -196,8 +199,7 @@ func splitID(id da.ID) (uint64, da.Commitment) {
if len(id) <= heightLen {
return 0, nil
}
commitment := id[heightLen:]
return binary.LittleEndian.Uint64(id[:heightLen]), commitment
return binary.LittleEndian.Uint64(id[:heightLen]), id[heightLen:]
}

var _ da.DA = &CelestiaDA{}

0 comments on commit 6533c4e

Please sign in to comment.