Ejemplo n.º 1
0
Archivo: gc.go Proyecto: qnib/go-ipfs
func BestEffortRoots(filesRoot *mfs.Root) ([]*cid.Cid, error) {
	rootDag, err := filesRoot.GetValue().GetNode()
	if err != nil {
		return nil, err
	}

	return []*cid.Cid{rootDag.Cid()}, nil
}
Ejemplo n.º 2
0
func BestEffortRoots(filesRoot *mfs.Root) ([]key.Key, error) {
	rootDag, err := filesRoot.GetValue().GetNode()
	if err != nil {
		return nil, err
	}
	rootKey, err := rootDag.Key()
	if err != nil {
		return nil, err
	}
	return []key.Key{rootKey}, nil
}