1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-19 01:39:35 +08:00

display key if BlockPut is successful

This commit is contained in:
Henry
2014-10-14 00:39:29 +02:00
parent 073ec11529
commit a6630c804f

View File

@ -45,8 +45,11 @@ func BlockPut(n *core.IpfsNode, args []string, opts map[string]interface{}, out
b := blocks.NewBlock(data)
log.Debug("BlockPut key: '%q'", b.Key())
_, err = n.Blocks.AddBlock(b)
log.Debug("BlockPut Done. Err: %q", err)
k, err := n.Blocks.AddBlock(b)
if err != nil {
return err
}
fmt.Fprintf(out, "added as '%s'\n", k)
return nil
}