celestiaorg / go-square

A library for encoding blobs into a 2D square of evenly sized chunks designed for sampling and reconstruction
Apache License 2.0
13 stars 16 forks source link

fix(blob): use proper share.MaxShareVersion const #64

Closed cristaloleg closed 3 months ago

cristaloleg commented 3 months ago

Overview

We were comparing against incorrect const (math.MaxUint8) but error message refers to the proper (share.MaxShareVersion).

Sadly we cannot import shares package in blob due to cyclic dependency, adding comment for the future. Also, removed useless fmt alias for fmt package.

cristaloleg commented 3 months ago

I mentioned cyclic import in PR description.

Wondertan commented 3 months ago

https://github.com/celestiaorg/go-square/pull/1#issuecomment-1857914345

I thought I mentioned it in that comment, but I likely forgot. Another good reason to keep core-core types under the same pkg is that we wouldn't need to deal with cycles.