filecoin-project / rust-fil-sector-builder

Other
13 stars 10 forks source link

handle corrupted or missing sector builder metadata on load #92

Closed laser closed 4 years ago

laser commented 4 years ago

Fixes #13

Why does this PR exist?

If the snapshot file (of sector builder metadata) was corrupted, the sector builder would panic when initialized.

What's in this PR?

This changeset makes the sector builder return an error (instead of panicking) if its snapshot file exists and is corrupted. It also adds better error messaging.

laser commented 4 years ago

@dignifiedquire

lgtm, but ci is upset

Yeah, parameters were missing which caused sector builder initiation to fail. Resolved it and now CI is green.