1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-17 08:10:12 +08:00

add-only-hash no longer stores entirety of everything in memory

License: MIT
Signed-off-by: Jeromy <jeromyj@gmail.com>
This commit is contained in:
Jeromy
2015-08-14 15:12:57 -07:00
committed by Juan Batiz-Benet
parent b52210766f
commit 30d10ce4f4
4 changed files with 40 additions and 24 deletions

View File

@ -623,7 +623,12 @@ func addLinkCaller(req cmds.Request, root *dag.Node) (key.Key, error) {
e := dagutils.NewDagEditor(nd.DAG, root)
err = e.InsertNodeAtPath(req.Context(), path, childk, createfunc)
childnd, err := nd.DAG.Get(req.Context(), childk)
if err != nil {
return "", err
}
err = e.InsertNodeAtPath(req.Context(), path, childnd, createfunc)
if err != nil {
return "", err
}