Unverified Commit de6f1daf authored by Steven Allen's avatar Steven Allen Committed by GitHub

Merge pull request #34 from ipfs/fix/fast-read

fix some performance regressions when reading protobuf nodes
parents 11062dcd 3bdd47fc
......@@ -131,7 +131,7 @@ func DecodeProtobufBlock(b blocks.Block) (ipld.Node, error) {
}
decnd.cached = c
decnd.SetCidBuilder(c.Prefix())
decnd.builder = c.Prefix()
return decnd, nil
}
......
......@@ -78,7 +78,6 @@ func (n *ProtoNode) SetCidBuilder(builder cid.Builder) {
n.builder = v0CidPrefix
} else {
n.builder = builder.WithCodec(cid.DagProtobuf)
n.encoded = nil
n.cached = cid.Undef
}
}
......
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