Commit 2d4f6466 authored by Christopher Schinnerl's avatar Christopher Schinnerl

unmarshal erasure coder

parent 03bc529b
......@@ -140,7 +140,14 @@ func loadSiaFileMetadata(path string, deps modules.Dependencies) (md Metadata, e
defer f.Close()
// Load the metadata.
decoder := json.NewDecoder(f)
err = decoder.Decode(&md)
if err = decoder.Decode(&md); err != nil {
return
}
// Create the erasure coder.
md.staticErasureCode, err = unmarshalErasureCoder(md.StaticErasureCodeType, md.StaticErasureCodeParams)
if err != nil {
return
}
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment