Closed th7nder closed 1 week ago
Nice. new typestate pattern makes it more readable. You can also use generics if you don't want to copy shared state like `sector_number`, `deals`, `piece_infos` between structs.
Something like:
struct Sector<State> { <shared> state: State } struct Unsealed { <unsealed specifics> } struct PreCommitted { <precommitted specifics> } struct Proven { <proven specifics> }
_Originally posted by @cernicc in https://github.com/eigerco/polka-storage/pull/502#discussion_r1831283039_
Closing since this is something that we'll figure out as we build
Something like:
_Originally posted by @cernicc in https://github.com/eigerco/polka-storage/pull/502#discussion_r1831283039_