Skip to content

Commit

Permalink
Merge pull request ipfs/go-merkledag#34 from ipfs/fix/fast-read
Browse files Browse the repository at this point in the history
fix some performance regressions when reading protobuf nodes

This commit was moved from ipfs/go-merkledag@de6f1da
  • Loading branch information
Stebalien committed Feb 28, 2019
2 parents c481c99 + 4deccc7 commit 6e836c6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion ipld/merkledag/coding.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down
1 change: 0 additions & 1 deletion ipld/merkledag/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit 6e836c6

Please sign in to comment.