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

fix bug in da.Validate api #90

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions celestia/celestia.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ func (c *CelestiaDA) blobsAndCommitments(daBlobs []da.Blob, ns da.Namespace) ([]
// Validate validates Commitments against the corresponding Proofs. This should be possible without retrieving the Blobs.
func (c *CelestiaDA) Validate(ctx context.Context, ids []da.ID, daProofs []da.Proof, ns da.Namespace) ([]bool, error) {
c.namespace = c.defaultNamespace(ns)
var included []bool
included := make([]bool, len(ids))
var proofs []*blob.Proof
for _, daProof := range daProofs {
nmtProof := &nmt.Proof{}
Expand All @@ -173,7 +173,7 @@ func (c *CelestiaDA) Validate(ctx context.Context, ids []da.ID, daProofs []da.Pr
// but analysis of the code in celestia-node implies this should never happen - maybe it's caused by openrpc?
// there is no way of gently handling errors here, but returned value is fine for us
isIncluded, _ := c.client.Blob.Included(ctx, height, c.namespace, proofs[i], commitment)
included = append(included, isIncluded)
included[i] = isIncluded
tsite marked this conversation as resolved.
Show resolved Hide resolved
}
return included, nil
}
Expand Down