Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cmwaters committed Jun 18, 2024
1 parent e517232 commit 46e9e0b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion blob/blob.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (b *Blob) Data() []byte {

func (b *Blob) ToProto() *BlobProto {
return &BlobProto{
NamespaceId: b.namespace.Bytes(),
NamespaceId: b.namespace.ID(),
NamespaceVersion: uint32(b.namespace.Version()),
ShareVersion: uint32(b.shareVersion),
Data: b.data,
Expand Down
2 changes: 1 addition & 1 deletion blob/blob.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion blob/blob.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package pkg.blob;

option go_package = "github.com/celestiaorg/go-square/blob";

// BlobProto the protobuf representation of a blob (binary large object)
// BlobProto is the protobuf representation of a blob (binary large object)
// to be published to the Celestia blockchain. The data of a Blob is published
// to a namespace and is encoded into shares based on the format specified by
// share_version.
Expand Down
2 changes: 1 addition & 1 deletion inclusion/commitment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func TestCreateCommitment(t *testing.T) {
namespace: ns1,
blob: bytes.Repeat([]byte{0xFF}, shares.AvailableBytesFromSparseShares(2)),
expectErr: true,
shareVersion: uint8(1), // unsupported share version
shareVersion: uint8(2), // unsupported share version
},
}
for _, tt := range tests {
Expand Down
1 change: 0 additions & 1 deletion shares/split_sparse_shares.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ func (sss *SparseShareSplitter) Write(blob *blob.Blob) error {
rawData := blob.Data()
blobNamespace := blob.Namespace()

// First share (note by validating the blob we can safely cast the share version to uint8)
b, err := NewBuilder(blobNamespace, blob.ShareVersion(), true)
if err != nil {
return err
Expand Down

0 comments on commit 46e9e0b

Please sign in to comment.