diff --git a/assets/assets.go b/assets/assets.go index 735a5bded29..7f9d15ed78e 100644 --- a/assets/assets.go +++ b/assets/assets.go @@ -11,8 +11,8 @@ import ( "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core/coreunix" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" // this import keeps gx from thinking the dep isn't used _ "gx/ipfs/QmdZ4PvPHFQVLLEve7DgoKDcSY19wwpGBB1GKjjKi2rEL1/dir-index-html" @@ -30,7 +30,7 @@ var initDocPaths = []string{ } // SeedInitDocs adds the list of embedded init documentation to the passed node, pins it and returns the root key -func SeedInitDocs(nd *core.IpfsNode) (*cid.Cid, error) { +func SeedInitDocs(nd *core.IpfsNode) (cid.Cid, error) { return addAssetList(nd, initDocPaths) } @@ -40,52 +40,52 @@ var initDirIndex = []string{ filepath.Join(initDirPath, "dir-index.html"), } -func SeedInitDirIndex(nd *core.IpfsNode) (*cid.Cid, error) { +func SeedInitDirIndex(nd *core.IpfsNode) (cid.Cid, error) { return addAssetList(nd, initDirIndex) } -func addAssetList(nd *core.IpfsNode, l []string) (*cid.Cid, error) { +func addAssetList(nd *core.IpfsNode, l []string) (cid.Cid, error) { dirb := uio.NewDirectory(nd.DAG) for _, p := range l { d, err := Asset(p) if err != nil { - return nil, fmt.Errorf("assets: could load Asset '%s': %s", p, err) + return cid.Cid{}, fmt.Errorf("assets: could load Asset '%s': %s", p, err) } s, err := coreunix.Add(nd, bytes.NewBuffer(d)) if err != nil { - return nil, fmt.Errorf("assets: could not Add '%s': %s", p, err) + return cid.Cid{}, fmt.Errorf("assets: could not Add '%s': %s", p, err) } fname := filepath.Base(p) c, err := cid.Decode(s) if err != nil { - return nil, err + return cid.Cid{}, err } node, err := nd.DAG.Get(nd.Context(), c) if err != nil { - return nil, err + return cid.Cid{}, err } if err := dirb.AddChild(nd.Context(), fname, node); err != nil { - return nil, fmt.Errorf("assets: could not add '%s' as a child: %s", fname, err) + return cid.Cid{}, fmt.Errorf("assets: could not add '%s' as a child: %s", fname, err) } } dir, err := dirb.GetNode() if err != nil { - return nil, err + return cid.Cid{}, err } if err := nd.Pinning.Pin(nd.Context(), dir, true); err != nil { - return nil, fmt.Errorf("assets: Pinning on init-docu failed: %s", err) + return cid.Cid{}, fmt.Errorf("assets: Pinning on init-docu failed: %s", err) } if err := nd.Pinning.Flush(); err != nil { - return nil, fmt.Errorf("assets: Pinning flush failed: %s", err) + return cid.Cid{}, fmt.Errorf("assets: Pinning flush failed: %s", err) } return dir.Cid(), nil diff --git a/blocks/blockstoreutil/remove.go b/blocks/blockstoreutil/remove.go index 71b9820d75b..5005ac4f3c3 100644 --- a/blocks/blockstoreutil/remove.go +++ b/blocks/blockstoreutil/remove.go @@ -7,9 +7,9 @@ import ( "github.com/ipfs/go-ipfs/pin" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bs "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + bs "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // RemovedBlock is used to respresent the result of removing a block. @@ -34,7 +34,7 @@ type RmBlocksOpts struct { // It returns a channel where objects of type RemovedBlock are placed, when // not using the Quiet option. Block removal is asynchronous and will // skip any pinned blocks. -func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []*cid.Cid, opts RmBlocksOpts) (<-chan interface{}, error) { +func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []cid.Cid, opts RmBlocksOpts) (<-chan interface{}, error) { // make the channel large enough to hold any result to avoid // blocking while holding the GCLock out := make(chan interface{}, len(cids)) @@ -65,8 +65,8 @@ func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []*cid.Cid, opts RmB // out channel, with an error which indicates that the Cid is pinned. // This function is used in RmBlocks to filter out any blocks which are not // to be removed (because they are pinned). -func FilterPinned(pins pin.Pinner, out chan<- interface{}, cids []*cid.Cid) []*cid.Cid { - stillOkay := make([]*cid.Cid, 0, len(cids)) +func FilterPinned(pins pin.Pinner, out chan<- interface{}, cids []cid.Cid) []cid.Cid { + stillOkay := make([]cid.Cid, 0, len(cids)) res, err := pins.CheckIfPinned(cids...) if err != nil { out <- &RemovedBlock{Error: fmt.Sprintf("pin check failed: %s", err)} diff --git a/core/builder.go b/core/builder.go index f10b9ee030e..22e590fab73 100644 --- a/core/builder.go +++ b/core/builder.go @@ -14,12 +14,11 @@ import ( repo "github.com/ipfs/go-ipfs/repo" cidv0v1 "github.com/ipfs/go-ipfs/thirdparty/cidv0v1" "github.com/ipfs/go-ipfs/thirdparty/verifbs" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" goprocessctx "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess/context" @@ -29,11 +28,12 @@ import ( libp2p "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p" cfg "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" record "gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" pstoremem "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore/pstoremem" p2phost "gx/ipfs/QmeMYW7Nj8jnnEfs9qhm7SxKkoDPUWXu3MsxX6BFwz34tf/go-libp2p-host" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" metrics "gx/ipfs/QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q/go-metrics-interface" ) diff --git a/core/commands/add.go b/core/commands/add.go index a8c817c6620..23772f33c05 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -11,20 +11,20 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" "github.com/ipfs/go-ipfs/core/coreunix" filestore "github.com/ipfs/go-ipfs/filestore" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - dagtest "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag/test" - blockservice "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + dagtest "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag/test" + blockservice "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" pb "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" - cidutil "gx/ipfs/QmPyxJ2QS7L5FhGkNYkNcXHGjDhvGHueJ4auqAstFHYxy5/go-cidutil" + cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // ErrDepthLimitExceeded indicates that the max depth has been exceeded. diff --git a/core/commands/bitswap.go b/core/commands/bitswap.go index 3396e05ac28..10581d35612 100644 --- a/core/commands/bitswap.go +++ b/core/commands/bitswap.go @@ -9,8 +9,8 @@ import ( lgc "github.com/ipfs/go-ipfs/commands/legacy" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - bitswap "gx/ipfs/QmVDDgboX5nPUE4pBcK2xC1b9XbStA4t2KrUWBRMr9AiFd/go-bitswap" - decision "gx/ipfs/QmVDDgboX5nPUE4pBcK2xC1b9XbStA4t2KrUWBRMr9AiFd/go-bitswap/decision" + bitswap "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap" + decision "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap/decision" "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" diff --git a/core/commands/dag/dag.go b/core/commands/dag/dag.go index 60edbb5b8e9..ad075a84e57 100644 --- a/core/commands/dag/dag.go +++ b/core/commands/dag/dag.go @@ -11,13 +11,13 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" coredag "github.com/ipfs/go-ipfs/core/coredag" pin "github.com/ipfs/go-ipfs/pin" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) var DagCmd = &cmds.Command{ @@ -39,12 +39,12 @@ to deprecate and replace the existing 'ipfs object' command moving forward. // OutputObject is the output type of 'dag put' command type OutputObject struct { - Cid *cid.Cid + Cid cid.Cid } // ResolveOutput is the output type of 'dag resolve' command type ResolveOutput struct { - Cid *cid.Cid + Cid cid.Cid RemPath string } @@ -143,7 +143,7 @@ into an object of the specified format. if dopin { defer n.Blockstore.PinLock().Unlock() - cids.ForEach(func(c *cid.Cid) error { + cids.ForEach(func(c cid.Cid) error { n.Pinning.PinWithMode(c, pin.Recursive) return nil }) diff --git a/core/commands/dht.go b/core/commands/dht.go index 454170dc42e..1b4cce1eb07 100644 --- a/core/commands/dht.go +++ b/core/commands/dht.go @@ -10,16 +10,16 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" b58 "gx/ipfs/QmWFAMPqsEyUX7gDUsRVmMWz59FxSpJ1b2v6bJ1yYzo7jY/go-base58-fast/base58" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - notif "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing/notifications" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" + notif "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing/notifications" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" ) @@ -283,7 +283,7 @@ var provideRefDhtCmd = &cmds.Command{ rec, _, _ := req.Option("recursive").Bool() - var cids []*cid.Cid + var cids []cid.Cid for _, arg := range req.Arguments() { c, err := cid.Decode(arg) if err != nil { @@ -368,7 +368,7 @@ var provideRefDhtCmd = &cmds.Command{ Type: notif.QueryEvent{}, } -func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []*cid.Cid) error { +func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []cid.Cid) error { for _, c := range cids { err := r.Provide(ctx, c, true) if err != nil { @@ -378,7 +378,7 @@ func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []*cid.Cid) er return nil } -func provideKeysRec(ctx context.Context, r routing.IpfsRouting, dserv ipld.DAGService, cids []*cid.Cid) error { +func provideKeysRec(ctx context.Context, r routing.IpfsRouting, dserv ipld.DAGService, cids []cid.Cid) error { provided := cid.NewSet() for _, c := range cids { kset := cid.NewSet() diff --git a/core/commands/files.go b/core/commands/files.go index ce04d657b58..a855d09925b 100644 --- a/core/commands/files.go +++ b/core/commands/files.go @@ -16,22 +16,22 @@ import ( core "github.com/ipfs/go-ipfs/core" cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bservice "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bservice "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) var flog = logging.Logger("cmds/files") diff --git a/core/commands/filestore.go b/core/commands/filestore.go index 709eb7677d1..3fa5c9a37bc 100644 --- a/core/commands/filestore.go +++ b/core/commands/filestore.go @@ -13,9 +13,9 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" "github.com/ipfs/go-ipfs/filestore" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" ) var FileStoreCmd = &cmds.Command{ @@ -57,7 +57,7 @@ The output is: } args := req.Arguments if len(args) > 0 { - out := perKeyActionToChan(req.Context, args, func(c *cid.Cid) *filestore.ListRes { + out := perKeyActionToChan(req.Context, args, func(c cid.Cid) *filestore.ListRes { return filestore.List(fs, c) }) @@ -157,7 +157,7 @@ For ERROR entries the error will also be printed to stderr. } args := req.Arguments() if len(args) > 0 { - out := perKeyActionToChan(req.Context(), args, func(c *cid.Cid) *filestore.ListRes { + out := perKeyActionToChan(req.Context(), args, func(c cid.Cid) *filestore.ListRes { return filestore.Verify(fs, c) }) res.SetOutput(out) @@ -269,7 +269,7 @@ func listResToChan(ctx context.Context, next func() *filestore.ListRes) <-chan i return out } -func perKeyActionToChan(ctx context.Context, args []string, action func(*cid.Cid) *filestore.ListRes) <-chan interface{} { +func perKeyActionToChan(ctx context.Context, args []string, action func(cid.Cid) *filestore.ListRes) <-chan interface{} { out := make(chan interface{}, 128) go func() { defer close(out) diff --git a/core/commands/get.go b/core/commands/get.go index 1cbd4e08f12..39baac9f8a0 100644 --- a/core/commands/get.go +++ b/core/commands/get.go @@ -13,13 +13,13 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + uarchive "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/archive" "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" "gx/ipfs/QmPtj12fdwuAqj9sBSTNUxBNu8kCGNp8b3o8yUzMm5GHpq/pb" tar "gx/ipfs/QmQine7gvHncNevKtG9QXxf3nXcwSj6aDDmMm52mHofEEp/tar-utils" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - uarchive "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/archive" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" ) var ErrInvalidCompressionLevel = errors.New("compression level must be between 1 and 9") diff --git a/core/commands/ls.go b/core/commands/ls.go index ec99c78fc97..566e0ad0135 100644 --- a/core/commands/ls.go +++ b/core/commands/ls.go @@ -9,18 +9,18 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - blockservice "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" - unixfs "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" - unixfspb "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/pb" - - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" + unixfs "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + unixfspb "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/pb" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + blockservice "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) type LsLink struct { diff --git a/core/commands/name/ipns.go b/core/commands/name/ipns.go index a2e58c35e79..d187fcf61ae 100644 --- a/core/commands/name/ipns.go +++ b/core/commands/name/ipns.go @@ -12,11 +12,11 @@ import ( namesys "github.com/ipfs/go-ipfs/namesys" nsopts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - offline "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + offline "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) var log = logging.Logger("core/commands/ipns") diff --git a/core/commands/name/publish.go b/core/commands/name/publish.go index a5a5711a177..92ddea6850b 100644 --- a/core/commands/name/publish.go +++ b/core/commands/name/publish.go @@ -12,11 +12,11 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" keystore "github.com/ipfs/go-ipfs/keystore" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) var PublishCmd = &cmds.Command{ diff --git a/core/commands/object/object.go b/core/commands/object/object.go index 5f681793dc7..36e274ee1b7 100644 --- a/core/commands/object/object.go +++ b/core/commands/object/object.go @@ -16,11 +16,11 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) const inputLimit = 2 << 20 diff --git a/core/commands/pin.go b/core/commands/pin.go index c8f455d23f7..27b15b70e1d 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -12,16 +12,16 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" corerepo "github.com/ipfs/go-ipfs/core/corerepo" pin "github.com/ipfs/go-ipfs/pin" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - "gx/ipfs/QmVUhfewLZpSaAiBYCpw2krYMaiVmFuhr2iurQLuRoU6sD/go-verifcid" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" ) var PinCmd = &cmds.Command{ @@ -94,7 +94,7 @@ var addPinCmd = &cmds.Command{ ctx := v.DeriveContext(req.Context()) type pinResult struct { - pins []*cid.Cid + pins []cid.Cid err error } ch := make(chan pinResult, 1) @@ -552,7 +552,7 @@ func pinLsAll(ctx context.Context, typeStr string, n *core.IpfsNode) (map[string keys := make(map[string]RefKeyObject) - AddToResultKeys := func(keyList []*cid.Cid, typeStr string) { + AddToResultKeys := func(keyList []cid.Cid, typeStr string) { for _, c := range keyList { keys[c.String()] = RefKeyObject{ Type: typeStr, @@ -611,8 +611,8 @@ func pinVerify(ctx context.Context, n *core.IpfsNode, opts pinVerifyOpts) <-chan getLinks := dag.GetLinksWithDAG(DAG) recPins := n.Pinning.RecursiveKeys() - var checkPin func(root *cid.Cid) PinStatus - checkPin = func(root *cid.Cid) PinStatus { + var checkPin func(root cid.Cid) PinStatus + checkPin = func(root cid.Cid) PinStatus { key := root.String() if status, ok := visited[key]; ok { return status @@ -680,7 +680,7 @@ func (r PinVerifyRes) Format(out io.Writer) { } } -func cidsToStrings(cs []*cid.Cid) []string { +func cidsToStrings(cs []cid.Cid) []string { out := make([]string, 0, len(cs)) for _, c := range cs { out = append(out, c.String()) diff --git a/core/commands/pubsub.go b/core/commands/pubsub.go index 83551e13a1d..cc52b5cc95f 100644 --- a/core/commands/pubsub.go +++ b/core/commands/pubsub.go @@ -14,11 +14,11 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" e "github.com/ipfs/go-ipfs/core/commands/e" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" floodsub "gx/ipfs/QmY1L5krVk8dv8d74uESmJTXGpoigVYqBVxXXz1aS8aFSb/go-libp2p-floodsub" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" ) @@ -166,7 +166,7 @@ This command outputs data in the following encodings: Type: floodsub.Message{}, } -func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid *cid.Cid) { +func connectToPubSubPeers(ctx context.Context, n *core.IpfsNode, cid cid.Cid) { ctx, cancel := context.WithCancel(ctx) defer cancel() diff --git a/core/commands/refs.go b/core/commands/refs.go index 425fc04a52c..05386f6a705 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -11,15 +11,15 @@ import ( "github.com/ipfs/go-ipfs/core" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // KeyList is a general type for outputting lists of keys type KeyList struct { - Keys []*cid.Cid + Keys []cid.Cid } // KeyListTextMarshaler outputs a KeyList as plaintext, one key per line @@ -317,7 +317,7 @@ func (rw *RefWriter) writeRefsRecursive(n ipld.Node, depth int) (int, error) { // rw.MaxDepth = -1 disables any pruning. But setting rw.Unique to true will // prune already visited branches at the cost of keeping as set of visited // CIDs in memory. -func (rw *RefWriter) visit(c *cid.Cid, depth int) (bool, bool) { +func (rw *RefWriter) visit(c cid.Cid, depth int) (bool, bool) { atMaxDepth := rw.MaxDepth >= 0 && depth == rw.MaxDepth overMaxDepth := rw.MaxDepth >= 0 && depth > rw.MaxDepth @@ -366,7 +366,7 @@ func (rw *RefWriter) visit(c *cid.Cid, depth int) (bool, bool) { } // Write one edge -func (rw *RefWriter) WriteEdge(from, to *cid.Cid, linkname string) error { +func (rw *RefWriter) WriteEdge(from, to cid.Cid, linkname string) error { if rw.Ctx != nil { select { case <-rw.Ctx.Done(): // just in case. diff --git a/core/commands/repo.go b/core/commands/repo.go index 914b6a21a85..1e35964bce7 100644 --- a/core/commands/repo.go +++ b/core/commands/repo.go @@ -16,11 +16,11 @@ import ( corerepo "github.com/ipfs/go-ipfs/core/corerepo" fsrepo "github.com/ipfs/go-ipfs/repo/fsrepo" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) type RepoVersion struct { @@ -46,7 +46,7 @@ var RepoCmd = &cmds.Command{ // GcResult is the result returned by "repo gc" command. type GcResult struct { - Key *cid.Cid + Key cid.Cid Error string `json:",omitempty"` } @@ -102,7 +102,7 @@ order to reclaim hard disk space. res.SetError(fmt.Errorf("encountered errors during gc run"), cmdkit.ErrNormal) } } else { - err := corerepo.CollectResult(req.Context(), gcOutChan, func(k *cid.Cid) { + err := corerepo.CollectResult(req.Context(), gcOutChan, func(k cid.Cid) { select { case outChan <- &GcResult{Key: k}: case <-req.Context().Done(): diff --git a/core/commands/resolve.go b/core/commands/resolve.go index eddef28ca48..75258464f84 100644 --- a/core/commands/resolve.go +++ b/core/commands/resolve.go @@ -12,7 +12,7 @@ import ( ncmd "github.com/ipfs/go-ipfs/core/commands/name" ns "github.com/ipfs/go-ipfs/namesys" nsopts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" ) diff --git a/core/commands/tar.go b/core/commands/tar.go index dda7eb6030d..bb8ffc21bba 100644 --- a/core/commands/tar.go +++ b/core/commands/tar.go @@ -9,8 +9,8 @@ import ( e "github.com/ipfs/go-ipfs/core/commands/e" "github.com/ipfs/go-ipfs/core/coreunix" tar "github.com/ipfs/go-ipfs/tar" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" ) diff --git a/core/commands/unixfs/ls.go b/core/commands/unixfs/ls.go index 28dd614b0e1..b9ba2b28017 100644 --- a/core/commands/unixfs/ls.go +++ b/core/commands/unixfs/ls.go @@ -12,12 +12,12 @@ import ( cmds "github.com/ipfs/go-ipfs/commands" core "github.com/ipfs/go-ipfs/core" e "github.com/ipfs/go-ipfs/core/commands/e" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - unixfs "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" - unixfspb "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/pb" + unixfs "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + unixfspb "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/pb" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" ) type LsLink struct { diff --git a/core/commands/urlstore.go b/core/commands/urlstore.go index 9ab2f6c0ca5..6030884fa63 100644 --- a/core/commands/urlstore.go +++ b/core/commands/urlstore.go @@ -8,14 +8,14 @@ import ( cmdenv "github.com/ipfs/go-ipfs/core/commands/cmdenv" filestore "github.com/ipfs/go-ipfs/filestore" + balanced "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/balanced" + ihelper "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/helpers" + trickle "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/trickle" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" cmdkit "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit" - balanced "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/balanced" - ihelper "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/trickle" - chunk "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + chunk "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" ) var urlStoreCmd = &cmds.Command{ diff --git a/core/core.go b/core/core.go index 27364fe0982..23dd349a83a 100644 --- a/core/core.go +++ b/core/core.go @@ -30,21 +30,20 @@ import ( pin "github.com/ipfs/go-ipfs/pin" repo "github.com/ipfs/go-ipfs/repo" - "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - dht "gx/ipfs/QmRNxiPpZf3skMAtmDJpgHuW9uj1ukqV1zjANj9d6bmHfE/go-libp2p-kad-dht" - dhtopts "gx/ipfs/QmRNxiPpZf3skMAtmDJpgHuW9uj1ukqV1zjANj9d6bmHfE/go-libp2p-kad-dht/opts" + exchange "gx/ipfs/QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM/go-ipfs-exchange-interface" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" quic "gx/ipfs/QmRgFWjY1idcimoGvSAzNenfptnciZnPHuW3P2yq9VgaqA/go-libp2p-quic-transport" - nilrouting "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/none" - offroute "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" + rhelpers "gx/ipfs/QmSFHnkFwayfnRKK1Z8jBUauMYMkHrZpQyvbxkFoPYb1VQ/go-libp2p-routing-helpers" mamask "gx/ipfs/QmSMZwvs3n4GBikZ7hKzT17c3bk65FmyZo2JqtJ16swqCv/multiaddr-filter" + nilrouting "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/none" + offroute "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" mafilter "gx/ipfs/QmSW4uNHbvQia8iZDXzbwjiyHQtnyo9aFqfQAMasj3TJ6Y/go-maddr-filter" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" libp2p "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p" @@ -53,30 +52,31 @@ import ( rhost "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/host/routed" identify "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/protocol/identify" ping "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/protocol/ping" - rhelpers "gx/ipfs/QmUy9RAnhX9LBEUbhg8mvrouMRsoF27ycvT2iZsSG8V7Sv/go-libp2p-routing-helpers" - bitswap "gx/ipfs/QmVDDgboX5nPUE4pBcK2xC1b9XbStA4t2KrUWBRMr9AiFd/go-bitswap" - bsnet "gx/ipfs/QmVDDgboX5nPUE4pBcK2xC1b9XbStA4t2KrUWBRMr9AiFd/go-bitswap/network" + bitswap "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap" + bsnet "gx/ipfs/QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1/go-bitswap/network" connmgr "gx/ipfs/QmW9pfNup4hcWxyMxDGSe25tG9xepvLqqmQUoTDaawzTZe/go-libp2p-connmgr" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" ifconnmgr "gx/ipfs/QmWGGN1nysi1qgqto31bENwESkmZBY4YGK4sZC3qhnqhSv/go-libp2p-interface-connmgr" circuit "gx/ipfs/QmWX6RySJ3yAYmfjLSw1LtRZnDh5oVeA9kM3scNQJkysqa/go-libp2p-circuit" - exchange "gx/ipfs/QmWw71Mz9PXKgYG8ZfTYN7Ax2Zm48Eurbne3wC2y7CKmLz/go-ipfs-exchange-interface" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" floodsub "gx/ipfs/QmY1L5krVk8dv8d74uESmJTXGpoigVYqBVxXXz1aS8aFSb/go-libp2p-floodsub" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" smux "gx/ipfs/QmY9JXR3FupnYAYJWK9aMr9bCpqWKcToQ1tz8DVGTrHpHw/go-stream-muxer" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + psrouter "gx/ipfs/QmYz19WrC7TskcVrSbH6sdPd1PvPMAnM9dEUnSTz4pwCWG/go-libp2p-pubsub-router" pnet "gx/ipfs/QmZaQ3K9PRd5sYYoG1xbTGPtd3N7TYiKBRmcBUTsx8HVET/go-libp2p-pnet" - psrouter "gx/ipfs/QmbcvfZBCN6FmPsL8wJmJxefmMNtk55h3uB5YJgVeqjfpK/go-libp2p-pubsub-router" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + dht "gx/ipfs/QmaXYSwxqJsX3EoGb1ZV2toZ9fXc8hWJPaBW1XAp1h2Tsp/go-libp2p-kad-dht" + dhtopts "gx/ipfs/QmaXYSwxqJsX3EoGb1ZV2toZ9fXc8hWJPaBW1XAp1h2Tsp/go-libp2p-kad-dht/opts" yamux "gx/ipfs/QmcsgrV3nCAKjiHKZhKVXWc4oY3WBECJCqahXEMpHeMrev/go-smux-yamux" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" record "gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" metrics "gx/ipfs/QmdhwKw53CTV8EJSAsR1bpmMT5kXiWBgeAyv1EXeeDiXqR/go-libp2p-metrics" mplex "gx/ipfs/QmdiBZzwGtN2yHJrWD9ojQ7ASS48nv7BcojWLkYd1ZtrV2/go-smux-multiplex" p2phost "gx/ipfs/QmeMYW7Nj8jnnEfs9qhm7SxKkoDPUWXu3MsxX6BFwz34tf/go-libp2p-host" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) const IpnsValidatorTag = "ipns" @@ -808,7 +808,7 @@ func (n *IpfsNode) loadBootstrapPeers() ([]pstore.PeerInfo, error) { func (n *IpfsNode) loadFilesRoot() error { dsk := ds.NewKey("/local/filesroot") - pf := func(ctx context.Context, c *cid.Cid) error { + pf := func(ctx context.Context, c cid.Cid) error { return n.Repo.Datastore().Put(dsk, c.Bytes()) } diff --git a/core/coreapi/block.go b/core/coreapi/block.go index e630e1211c6..7657f6520b7 100644 --- a/core/coreapi/block.go +++ b/core/coreapi/block.go @@ -11,8 +11,8 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" ) type BlockAPI CoreAPI @@ -75,7 +75,7 @@ func (api *BlockAPI) Rm(ctx context.Context, p coreiface.Path, opts ...caopts.Bl if err != nil { return err } - cids := []*cid.Cid{rp.Cid()} + cids := []cid.Cid{rp.Cid()} o := util.RmBlocksOpts{Force: settings.Force} out, err := util.RmBlocks(api.node.Blockstore, api.node.Pinning, cids, o) diff --git a/core/coreapi/dag.go b/core/coreapi/dag.go index 98393d33454..7adf823eece 100644 --- a/core/coreapi/dag.go +++ b/core/coreapi/dag.go @@ -12,8 +12,8 @@ import ( caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" coredag "github.com/ipfs/go-ipfs/core/coredag" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) type DagAPI CoreAPI diff --git a/core/coreapi/dht.go b/core/coreapi/dht.go index 0585fdb860b..e2fc741de71 100644 --- a/core/coreapi/dht.go +++ b/core/coreapi/dht.go @@ -8,15 +8,15 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" - cidutil "gx/ipfs/QmPyxJ2QS7L5FhGkNYkNcXHGjDhvGHueJ4auqAstFHYxy5/go-cidutil" - blockservice "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + blockservice "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) type DhtAPI CoreAPI @@ -77,9 +77,9 @@ func (api *DhtAPI) Provide(ctx context.Context, path coreiface.Path, opts ...cao } if settings.Recursive { - err = provideKeysRec(ctx, api.node.Routing, api.node.Blockstore, []*cid.Cid{c}) + err = provideKeysRec(ctx, api.node.Routing, api.node.Blockstore, []cid.Cid{c}) } else { - err = provideKeys(ctx, api.node.Routing, []*cid.Cid{c}) + err = provideKeys(ctx, api.node.Routing, []cid.Cid{c}) } if err != nil { return err @@ -88,7 +88,7 @@ func (api *DhtAPI) Provide(ctx context.Context, path coreiface.Path, opts ...cao return nil } -func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []*cid.Cid) error { +func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []cid.Cid) error { for _, c := range cids { err := r.Provide(ctx, c, true) if err != nil { @@ -98,7 +98,7 @@ func provideKeys(ctx context.Context, r routing.IpfsRouting, cids []*cid.Cid) er return nil } -func provideKeysRec(ctx context.Context, r routing.IpfsRouting, bs blockstore.Blockstore, cids []*cid.Cid) error { +func provideKeysRec(ctx context.Context, r routing.IpfsRouting, bs blockstore.Blockstore, cids []cid.Cid) error { provided := cidutil.NewStreamingSet() errCh := make(chan error) diff --git a/core/coreapi/dht_test.go b/core/coreapi/dht_test.go index 759835b567f..20b3ecc32a5 100644 --- a/core/coreapi/dht_test.go +++ b/core/coreapi/dht_test.go @@ -10,7 +10,7 @@ import ( "github.com/ipfs/go-ipfs/core/coreapi/interface/options" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" ) func TestDhtFindPeer(t *testing.T) { diff --git a/core/coreapi/interface/coreapi.go b/core/coreapi/interface/coreapi.go index 9811b75be85..0053d472e6b 100644 --- a/core/coreapi/interface/coreapi.go +++ b/core/coreapi/interface/coreapi.go @@ -5,7 +5,7 @@ package iface import ( "context" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // CoreAPI defines an unified interface to IPFS for Go programs diff --git a/core/coreapi/interface/dag.go b/core/coreapi/interface/dag.go index d3270928c05..06bb91dce89 100644 --- a/core/coreapi/interface/dag.go +++ b/core/coreapi/interface/dag.go @@ -6,7 +6,7 @@ import ( "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // DagOps groups operations that can be batched together diff --git a/core/coreapi/interface/object.go b/core/coreapi/interface/object.go index 750638a332c..6b355a302a8 100644 --- a/core/coreapi/interface/object.go +++ b/core/coreapi/interface/object.go @@ -6,14 +6,14 @@ import ( options "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // ObjectStat provides information about dag nodes type ObjectStat struct { // Cid is the CID of the node - Cid *cid.Cid + Cid cid.Cid // NumLinks is number of links the node contains NumLinks int diff --git a/core/coreapi/interface/options/block.go b/core/coreapi/interface/options/block.go index 36b3baa0ebf..6603136f301 100644 --- a/core/coreapi/interface/options/block.go +++ b/core/coreapi/interface/options/block.go @@ -2,8 +2,8 @@ package options import ( "fmt" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" ) type BlockPutSettings struct { diff --git a/core/coreapi/interface/options/dag.go b/core/coreapi/interface/options/dag.go index 689bb5c5328..4fdff0489c7 100644 --- a/core/coreapi/interface/options/dag.go +++ b/core/coreapi/interface/options/dag.go @@ -3,7 +3,7 @@ package options import ( "math" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ) type DagPutSettings struct { diff --git a/core/coreapi/interface/path.go b/core/coreapi/interface/path.go index c2b4cd86970..c61b3353379 100644 --- a/core/coreapi/interface/path.go +++ b/core/coreapi/interface/path.go @@ -1,9 +1,9 @@ package iface import ( - ipfspath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + ipfspath "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ) //TODO: merge with ipfspath so we don't depend on it @@ -65,7 +65,7 @@ type ResolvedPath interface { // * Calling Cid() will return `cidB` // * Calling Root() will return `cidRoot` // * Calling Remainder() will return `foo/bar` - Cid() *cid.Cid + Cid() cid.Cid // Root returns the CID of the root object of the path // @@ -74,7 +74,7 @@ type ResolvedPath interface { // "/ipfs/QmRoot/A/B", the Root method will return the CID of object QmRoot // // For more examples see the documentation of Cid() method - Root() *cid.Cid + Root() cid.Cid // Remainder returns unresolved part of the path // @@ -100,13 +100,13 @@ type path struct { // resolvedPath implements coreiface.resolvedPath type resolvedPath struct { path - cid *cid.Cid - root *cid.Cid + cid cid.Cid + root cid.Cid remainder string } // IpfsPath creates new /ipfs path from the provided CID -func IpfsPath(c *cid.Cid) ResolvedPath { +func IpfsPath(c cid.Cid) ResolvedPath { return &resolvedPath{ path: path{ipfspath.Path("/ipfs/" + c.String())}, cid: c, @@ -116,7 +116,7 @@ func IpfsPath(c *cid.Cid) ResolvedPath { } // IpldPath creates new /ipld path from the provided CID -func IpldPath(c *cid.Cid) ResolvedPath { +func IpldPath(c cid.Cid) ResolvedPath { return &resolvedPath{ path: path{ipfspath.Path("/ipld/" + c.String())}, cid: c, @@ -138,7 +138,7 @@ func ParsePath(p string) (Path, error) { // NewResolvedPath creates new ResolvedPath. This function performs no checks // and is intended to be used by resolver implementations. Incorrect inputs may // cause panics. Handle with care. -func NewResolvedPath(ipath ipfspath.Path, c *cid.Cid, root *cid.Cid, remainder string) ResolvedPath { +func NewResolvedPath(ipath ipfspath.Path, c cid.Cid, root cid.Cid, remainder string) ResolvedPath { return &resolvedPath{ path: path{ipath}, cid: c, @@ -163,11 +163,11 @@ func (p *path) Mutable() bool { return p.Namespace() == "ipns" } -func (p *resolvedPath) Cid() *cid.Cid { +func (p *resolvedPath) Cid() cid.Cid { return p.cid } -func (p *resolvedPath) Root() *cid.Cid { +func (p *resolvedPath) Root() cid.Cid { return p.root } diff --git a/core/coreapi/interface/unixfs.go b/core/coreapi/interface/unixfs.go index 80f7ba39604..4a3aff6fc53 100644 --- a/core/coreapi/interface/unixfs.go +++ b/core/coreapi/interface/unixfs.go @@ -4,7 +4,7 @@ import ( "context" "io" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // UnixfsAPI is the basic interface to immutable files in IPFS diff --git a/core/coreapi/key.go b/core/coreapi/key.go index 890b85d2cc3..036c4f2f903 100644 --- a/core/coreapi/key.go +++ b/core/coreapi/key.go @@ -8,7 +8,7 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" - ipfspath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + ipfspath "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" diff --git a/core/coreapi/name.go b/core/coreapi/name.go index c7073fe4a08..79b785f1112 100644 --- a/core/coreapi/name.go +++ b/core/coreapi/name.go @@ -13,11 +13,11 @@ import ( keystore "github.com/ipfs/go-ipfs/keystore" namesys "github.com/ipfs/go-ipfs/namesys" nsopts "github.com/ipfs/go-ipfs/namesys/opts" - ipath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + ipath "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" crypto "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - offline "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + offline "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" ) type NameAPI CoreAPI diff --git a/core/coreapi/name_test.go b/core/coreapi/name_test.go index c0460b1571c..0f296e29d7b 100644 --- a/core/coreapi/name_test.go +++ b/core/coreapi/name_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - ipath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + ipath "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" opt "github.com/ipfs/go-ipfs/core/coreapi/interface/options" diff --git a/core/coreapi/object.go b/core/coreapi/object.go index 8216a127eb3..c750e528228 100644 --- a/core/coreapi/object.go +++ b/core/coreapi/object.go @@ -16,10 +16,10 @@ import ( "github.com/ipfs/go-ipfs/dagutils" "github.com/ipfs/go-ipfs/pin" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) const inputLimit = 2 << 20 @@ -320,11 +320,11 @@ func (api *ObjectAPI) Diff(ctx context.Context, before coreiface.Path, after cor Path: change.Path, } - if change.Before != nil { + if change.Before.Defined() { out[i].Before = coreiface.IpfsPath(change.Before) } - if change.After != nil { + if change.After.Defined() { out[i].After = coreiface.IpfsPath(change.After) } } diff --git a/core/coreapi/path.go b/core/coreapi/path.go index 03dc11f61d9..cba68aeeac2 100644 --- a/core/coreapi/path.go +++ b/core/coreapi/path.go @@ -8,12 +8,12 @@ import ( core "github.com/ipfs/go-ipfs/core" coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" namesys "github.com/ipfs/go-ipfs/namesys" - ipfspath "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + ipfspath "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // ResolveNode resolves the path `p` using Unixfs resolver, gets and returns the diff --git a/core/coreapi/pin.go b/core/coreapi/pin.go index 50cf7e4f4a2..5c92cb983d0 100644 --- a/core/coreapi/pin.go +++ b/core/coreapi/pin.go @@ -7,11 +7,11 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" caopts "github.com/ipfs/go-ipfs/core/coreapi/interface/options" corerepo "github.com/ipfs/go-ipfs/core/corerepo" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" ) type PinAPI CoreAPI @@ -81,7 +81,7 @@ func (api *PinAPI) Update(ctx context.Context, from coreiface.Path, to coreiface } type pinStatus struct { - cid *cid.Cid + cid cid.Cid ok bool badNodes []coreiface.BadPinNode } @@ -115,8 +115,8 @@ func (api *PinAPI) Verify(ctx context.Context) (<-chan coreiface.PinStatus, erro getLinks := merkledag.GetLinksWithDAG(DAG) recPins := api.node.Pinning.RecursiveKeys() - var checkPin func(root *cid.Cid) *pinStatus - checkPin = func(root *cid.Cid) *pinStatus { + var checkPin func(root cid.Cid) *pinStatus + checkPin = func(root cid.Cid) *pinStatus { key := root.String() if status, ok := visited[key]; ok { return status @@ -171,7 +171,7 @@ func (api *PinAPI) pinLsAll(typeStr string, ctx context.Context) ([]coreiface.Pi keys := make(map[string]*pinInfo) - AddToResultKeys := func(keyList []*cid.Cid, typeStr string) { + AddToResultKeys := func(keyList []cid.Cid, typeStr string) { for _, c := range keyList { keys[c.String()] = &pinInfo{ pinType: typeStr, diff --git a/core/coreapi/unixfs.go b/core/coreapi/unixfs.go index e5ed299ec50..1798336dbdb 100644 --- a/core/coreapi/unixfs.go +++ b/core/coreapi/unixfs.go @@ -6,10 +6,10 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" coreunix "github.com/ipfs/go-ipfs/core/coreunix" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) type UnixfsAPI CoreAPI diff --git a/core/coreapi/unixfs_test.go b/core/coreapi/unixfs_test.go index ccee30f1349..7af4d9a1986 100644 --- a/core/coreapi/unixfs_test.go +++ b/core/coreapi/unixfs_test.go @@ -19,16 +19,16 @@ import ( keystore "github.com/ipfs/go-ipfs/keystore" repo "github.com/ipfs/go-ipfs/repo" - mdag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + unixfs "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + cbor "gx/ipfs/QmPrv66vmh2P7vLJMpYx6DWLTNKvVB4Jdkyxs6V3QvWKvf/go-ipld-cbor" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" datastore "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" syncds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" mocknet "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/net/mock" - unixfs "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + mdag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" - cbor "gx/ipfs/QmepvyyduWnXHm1G7ybmGbJfQQHTAo36DjP2nvF7H7ZXjE/go-ipld-cbor" ) const testPeerID = "QmTFauExutTsy4XP6JbMFcw2Wa9645HJt2bTqL6qYDCKfe" diff --git a/core/coredag/cbor.go b/core/coredag/cbor.go index 848007a4c0e..10c184df618 100644 --- a/core/coredag/cbor.go +++ b/core/coredag/cbor.go @@ -4,8 +4,8 @@ import ( "io" "io/ioutil" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - ipldcbor "gx/ipfs/QmepvyyduWnXHm1G7ybmGbJfQQHTAo36DjP2nvF7H7ZXjE/go-ipld-cbor" + ipldcbor "gx/ipfs/QmPrv66vmh2P7vLJMpYx6DWLTNKvVB4Jdkyxs6V3QvWKvf/go-ipld-cbor" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func cborJSONParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/core/coredag/dagpb.go b/core/coredag/dagpb.go index 0e5bf5221cc..607350595fd 100644 --- a/core/coredag/dagpb.go +++ b/core/coredag/dagpb.go @@ -5,11 +5,11 @@ import ( "io/ioutil" "math" - "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func dagpbJSONParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/core/coredag/dagtransl.go b/core/coredag/dagtransl.go index 88f21f589a7..b38dc2d0837 100644 --- a/core/coredag/dagtransl.go +++ b/core/coredag/dagtransl.go @@ -4,7 +4,7 @@ import ( "fmt" "io" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // DagParser is function used for parsing stream into Node diff --git a/core/coredag/raw.go b/core/coredag/raw.go index 40ecaa614b1..8dbc045a720 100644 --- a/core/coredag/raw.go +++ b/core/coredag/raw.go @@ -5,12 +5,12 @@ import ( "io/ioutil" "math" - "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - block "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + block "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func rawRawParser(r io.Reader, mhType uint64, mhLen int) ([]ipld.Node, error) { diff --git a/core/corehttp/commands.go b/core/corehttp/commands.go index 4215dbea8e9..59d0d49b2f1 100644 --- a/core/corehttp/commands.go +++ b/core/corehttp/commands.go @@ -14,9 +14,9 @@ import ( "github.com/ipfs/go-ipfs/core" corecommands "github.com/ipfs/go-ipfs/core/commands" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" cmds "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds" cmdsHttp "gx/ipfs/QmPTfgFTo9PFr1PvPKyKoeMgBvYPh6cX3aDP7DHKVbnCbi/go-ipfs-cmds/http" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" ) diff --git a/core/corehttp/gateway_handler.go b/core/corehttp/gateway_handler.go index 24f8ff7e8a9..7d1bbb6f5ed 100644 --- a/core/corehttp/gateway_handler.go +++ b/core/corehttp/gateway_handler.go @@ -16,19 +16,19 @@ import ( core "github.com/ipfs/go-ipfs/core" coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" "github.com/ipfs/go-ipfs/dagutils" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - multibase "gx/ipfs/QmSbvata2WqNkqGtZNg8MR3SKwnB8iQ7vTPJgWqB8bC5kR/go-multibase" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - chunker "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" + chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" + multibase "gx/ipfs/QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd/go-multibase" ) const ( @@ -443,7 +443,7 @@ func (i *gatewayHandler) putHandler(w http.ResponseWriter, r *http.Request) { newPath = path.Join(rsegs[2:]) } - var newcid *cid.Cid + var newcid cid.Cid rnode, err := core.Resolve(ctx, i.node.Namesys, i.node.Resolver, rootPath) switch ev := err.(type) { case resolver.ErrNoLink: diff --git a/core/corehttp/gateway_test.go b/core/corehttp/gateway_test.go index 248a9c3e6eb..3d096fc87dc 100644 --- a/core/corehttp/gateway_test.go +++ b/core/corehttp/gateway_test.go @@ -18,12 +18,12 @@ import ( nsopts "github.com/ipfs/go-ipfs/namesys/opts" repo "github.com/ipfs/go-ipfs/repo" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" datastore "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" syncds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" id "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/protocol/identify" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" ) diff --git a/core/corerepo/gc.go b/core/corerepo/gc.go index 85bf5046bff..985eb871462 100644 --- a/core/corerepo/gc.go +++ b/core/corerepo/gc.go @@ -11,9 +11,9 @@ import ( repo "github.com/ipfs/go-ipfs/repo" humanize "gx/ipfs/QmPSBJL4momYnE7DcUyk2DVhD6rH488ZmHBGLbxNdhU44K/go-humanize" - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" ) var log = logging.Logger("corerepo") @@ -70,13 +70,13 @@ func NewGC(n *core.IpfsNode) (*GC, error) { }, nil } -func BestEffortRoots(filesRoot *mfs.Root) ([]*cid.Cid, error) { +func BestEffortRoots(filesRoot *mfs.Root) ([]cid.Cid, error) { rootDag, err := filesRoot.GetDirectory().GetNode() if err != nil { return nil, err } - return []*cid.Cid{rootDag.Cid()}, nil + return []cid.Cid{rootDag.Cid()}, nil } func GarbageCollect(n *core.IpfsNode, ctx context.Context) error { @@ -94,7 +94,7 @@ func GarbageCollect(n *core.IpfsNode, ctx context.Context) error { // CollectResult collects the output of a garbage collection run and calls the // given callback for each object removed. It also collects all errors into a // MultiError which is returned after the gc is completed. -func CollectResult(ctx context.Context, gcOut <-chan gc.Result, cb func(*cid.Cid)) error { +func CollectResult(ctx context.Context, gcOut <-chan gc.Result, cb func(cid.Cid)) error { var errors []error loop: for { @@ -105,7 +105,7 @@ loop: } if res.Error != nil { errors = append(errors, res.Error) - } else if res.KeyRemoved != nil && cb != nil { + } else if res.KeyRemoved.Defined() && cb != nil { cb(res.KeyRemoved) } case <-ctx.Done(): diff --git a/core/corerepo/pinning.go b/core/corerepo/pinning.go index 81c843bc1b6..89121ffe2bf 100644 --- a/core/corerepo/pinning.go +++ b/core/corerepo/pinning.go @@ -18,15 +18,15 @@ import ( "fmt" "github.com/ipfs/go-ipfs/core" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ) -func Pin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]*cid.Cid, error) { - out := make([]*cid.Cid, len(paths)) +func Pin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]cid.Cid, error) { + out := make([]cid.Cid, len(paths)) r := &resolver.Resolver{ DAG: n.DAG, @@ -58,8 +58,8 @@ func Pin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) return out, nil } -func Unpin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]*cid.Cid, error) { - unpinned := make([]*cid.Cid, len(paths)) +func Unpin(n *core.IpfsNode, ctx context.Context, paths []string, recursive bool) ([]cid.Cid, error) { + unpinned := make([]cid.Cid, len(paths)) r := &resolver.Resolver{ DAG: n.DAG, diff --git a/core/coreunix/add.go b/core/coreunix/add.go index e52c721f032..5b9fde1e9ba 100644 --- a/core/coreunix/add.go +++ b/core/coreunix/add.go @@ -12,20 +12,20 @@ import ( core "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/pin" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - unixfs "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - balanced "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/balanced" - ihelper "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/helpers" - trickle "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer/trickle" - - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" + unixfs "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + balanced "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/balanced" + ihelper "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/helpers" + trickle "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer/trickle" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + + posinfo "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - posinfo "gx/ipfs/QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU/go-ipfs-posinfo" - chunker "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) var log = logging.Logger("coreunix") @@ -88,7 +88,7 @@ type Adder struct { root ipld.Node mroot *mfs.Root unlocker bstore.Unlocker - tempRoot *cid.Cid + tempRoot cid.Cid CidBuilder cid.Builder liveNodes uint64 } @@ -182,7 +182,7 @@ func (adder *Adder) PinRoot() error { return err } - if adder.tempRoot != nil { + if adder.tempRoot.Defined() { err := adder.pinning.Unpin(adder.ctx, adder.tempRoot, true) if err != nil { return err diff --git a/core/coreunix/add_test.go b/core/coreunix/add_test.go index 7a9655fcb6c..fcee63c1e03 100644 --- a/core/coreunix/add_test.go +++ b/core/coreunix/add_test.go @@ -14,16 +14,16 @@ import ( "github.com/ipfs/go-ipfs/pin/gc" "github.com/ipfs/go-ipfs/repo" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + pi "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" files "gx/ipfs/QmSP88ryZkHSRn1fnngAaV2Vcn63WUJzAavnRM9CVdU1Ky/go-ipfs-cmdkit/files" datastore "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" syncds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - pi "gx/ipfs/QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU/go-ipfs-posinfo" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" config "gx/ipfs/QmYVqYJTVjetcf1guieEgWpK1PZtHPytP624vKzTF1P3r2/go-ipfs-config" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) const testPeerID = "QmTFauExutTsy4XP6JbMFcw2Wa9645HJt2bTqL6qYDCKfe" @@ -137,7 +137,7 @@ func TestAddGCLive(t *testing.T) { } } - var last *cid.Cid + var last cid.Cid for a := range out { // wait for it to finish c, err := cid.Decode(a.(*AddedObject).Hash) diff --git a/core/coreunix/cat.go b/core/coreunix/cat.go index 86c447f3b2d..810676d2350 100644 --- a/core/coreunix/cat.go +++ b/core/coreunix/cat.go @@ -4,9 +4,9 @@ import ( "context" core "github.com/ipfs/go-ipfs/core" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" ) func Cat(ctx context.Context, n *core.IpfsNode, pstr string) (uio.DagReader, error) { diff --git a/core/coreunix/metadata.go b/core/coreunix/metadata.go index 4bf901fe137..f0d0b4ee466 100644 --- a/core/coreunix/metadata.go +++ b/core/coreunix/metadata.go @@ -2,9 +2,9 @@ package coreunix import ( core "github.com/ipfs/go-ipfs/core" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" ) func AddMetadataTo(n *core.IpfsNode, skey string, m *ft.Metadata) (string, error) { diff --git a/core/coreunix/metadata_test.go b/core/coreunix/metadata_test.go index 448e57e9012..a503bfd6887 100644 --- a/core/coreunix/metadata_test.go +++ b/core/coreunix/metadata_test.go @@ -7,20 +7,20 @@ import ( "testing" core "github.com/ipfs/go-ipfs/core" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" - importer "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + importer "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - chunker "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) func getDagserv(t *testing.T) ipld.DAGService { diff --git a/core/pathresolver.go b/core/pathresolver.go index 5431f153ef3..3997f5c0d05 100644 --- a/core/pathresolver.go +++ b/core/pathresolver.go @@ -6,12 +6,12 @@ import ( "strings" namesys "github.com/ipfs/go-ipfs/namesys" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - resolver "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path/resolver" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + resolver "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path/resolver" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // ErrNoNamesys is an explicit error for when an IPFS node doesn't @@ -80,7 +80,7 @@ func Resolve(ctx context.Context, nsys namesys.NameSystem, r *resolver.Resolver, // It first checks if the path is already in the form of just a cid ( or // /ipfs/) and returns immediately if so. Otherwise, it falls back onto // Resolve to perform resolution of the dagnode being referenced. -func ResolveToCid(ctx context.Context, nsys namesys.NameSystem, r *resolver.Resolver, p path.Path) (*cid.Cid, error) { +func ResolveToCid(ctx context.Context, nsys namesys.NameSystem, r *resolver.Resolver, p path.Path) (cid.Cid, error) { // If the path is simply a cid, parse and return it. Parsed paths are already // normalized (read: prepended with /ipfs/ if needed), so segment[1] should @@ -93,17 +93,17 @@ func ResolveToCid(ctx context.Context, nsys namesys.NameSystem, r *resolver.Reso // segment of the path and resolve its link to the last segment. head, tail, err := p.PopLastSegment() if err != nil { - return nil, err + return cid.Cid{}, err } dagnode, err := Resolve(ctx, nsys, r, head) if err != nil { - return nil, err + return cid.Cid{}, err } // Extract and return the cid of the link to the target dag node. link, _, err := dagnode.ResolveLink([]string{tail}) if err != nil { - return nil, err + return cid.Cid{}, err } return link.Cid, nil diff --git a/core/pathresolver_test.go b/core/pathresolver_test.go index 8b47bd4877c..a773b7cc318 100644 --- a/core/pathresolver_test.go +++ b/core/pathresolver_test.go @@ -5,7 +5,7 @@ import ( core "github.com/ipfs/go-ipfs/core" coremock "github.com/ipfs/go-ipfs/core/mock" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) func TestResolveNoComponents(t *testing.T) { diff --git a/dagutils/diff.go b/dagutils/diff.go index 17f82d9816c..97d50c88ec4 100644 --- a/dagutils/diff.go +++ b/dagutils/diff.go @@ -7,9 +7,9 @@ import ( coreiface "github.com/ipfs/go-ipfs/core/coreapi/interface" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // These constants define the changes that can be applied to a DAG. @@ -24,8 +24,8 @@ const ( type Change struct { Type coreiface.ChangeType Path string - Before *cid.Cid - After *cid.Cid + Before cid.Cid + After cid.Cid } // String prints a human-friendly line about a change. diff --git a/dagutils/diffenum.go b/dagutils/diffenum.go index fdd8dceaa1b..f94453af8b3 100644 --- a/dagutils/diffenum.go +++ b/dagutils/diffenum.go @@ -4,16 +4,16 @@ import ( "context" "fmt" - mdag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + mdag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // DiffEnumerate fetches every object in the graph pointed to by 'to' that is // not in 'from'. This can be used to more efficiently fetch a graph if you can // guarantee you already have the entirety of 'from' -func DiffEnumerate(ctx context.Context, dserv ipld.NodeGetter, from, to *cid.Cid) error { +func DiffEnumerate(ctx context.Context, dserv ipld.NodeGetter, from, to cid.Cid) error { fnd, err := dserv.Get(ctx, from) if err != nil { return fmt.Errorf("get %s: %s", from, err) @@ -31,12 +31,12 @@ func DiffEnumerate(ctx context.Context, dserv ipld.NodeGetter, from, to *cid.Cid // Since we're already assuming we have everything in the 'from' graph, // add all those cids to our 'already seen' set to avoid potentially // enumerating them later - if c.bef != nil { + if c.bef.Defined() { sset.Add(c.bef) } } for _, c := range diff { - if c.bef == nil { + if !c.bef.Defined() { if sset.Has(c.aft) { continue } @@ -59,7 +59,7 @@ func DiffEnumerate(ctx context.Context, dserv ipld.NodeGetter, from, to *cid.Cid // if bef is nil and aft is not, that means aft was newly added // if aft is nil and bef is not, that means bef was deleted type diffpair struct { - bef, aft *cid.Cid + bef, aft cid.Cid } // getLinkDiff returns a changeset between nodes 'a' and 'b'. Currently does @@ -67,7 +67,7 @@ type diffpair struct { func getLinkDiff(a, b ipld.Node) []diffpair { ina := make(map[string]*ipld.Link) inb := make(map[string]*ipld.Link) - var aonly []*cid.Cid + var aonly []cid.Cid for _, l := range b.Links() { inb[l.Cid.KeyString()] = l } diff --git a/dagutils/diffenum_test.go b/dagutils/diffenum_test.go index aee396c7a6a..3d27585de02 100644 --- a/dagutils/diffenum_test.go +++ b/dagutils/diffenum_test.go @@ -5,11 +5,11 @@ import ( "fmt" "testing" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - mdtest "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag/test" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + mdtest "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag/test" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func buildNode(name string, desc map[string]ndesc, out map[string]ipld.Node) ipld.Node { @@ -147,7 +147,7 @@ func TestDiffEnumBasic(t *testing.T) { t.Fatal(err) } - err = assertCidList(lgds.log, []*cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid()}) + err = assertCidList(lgds.log, []cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid()}) if err != nil { t.Fatal(err) } @@ -155,10 +155,10 @@ func TestDiffEnumBasic(t *testing.T) { type getLogger struct { ds ipld.NodeGetter - log []*cid.Cid + log []cid.Cid } -func (gl *getLogger) Get(ctx context.Context, c *cid.Cid) (ipld.Node, error) { +func (gl *getLogger) Get(ctx context.Context, c cid.Cid) (ipld.Node, error) { nd, err := gl.ds.Get(ctx, c) if err != nil { return nil, err @@ -167,7 +167,7 @@ func (gl *getLogger) Get(ctx context.Context, c *cid.Cid) (ipld.Node, error) { return nd, nil } -func (gl *getLogger) GetMany(ctx context.Context, cids []*cid.Cid) <-chan *ipld.NodeOption { +func (gl *getLogger) GetMany(ctx context.Context, cids []cid.Cid) <-chan *ipld.NodeOption { outCh := make(chan *ipld.NodeOption, len(cids)) nds := gl.ds.GetMany(ctx, cids) for no := range nds { @@ -183,7 +183,7 @@ func (gl *getLogger) GetMany(ctx context.Context, cids []*cid.Cid) <-chan *ipld. return nds } -func assertCidList(a, b []*cid.Cid) error { +func assertCidList(a, b []cid.Cid) error { if len(a) != len(b) { return fmt.Errorf("got different number of cids than expected") } @@ -215,7 +215,7 @@ func TestDiffEnumFail(t *testing.T) { t.Fatal("expected err not found") } - err = assertCidList(lgds.log, []*cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid()}) + err = assertCidList(lgds.log, []cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid()}) if err != nil { t.Fatal(err) } @@ -242,7 +242,7 @@ func TestDiffEnumRecurse(t *testing.T) { t.Fatal(err) } - err = assertCidList(lgds.log, []*cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid(), nds["d"].Cid()}) + err = assertCidList(lgds.log, []cid.Cid{nds["a1"].Cid(), nds["a2"].Cid(), nds["c"].Cid(), nds["d"].Cid()}) if err != nil { t.Fatal(err) } diff --git a/dagutils/utils.go b/dagutils/utils.go index 2eeb70d4b83..f4a4015f93c 100644 --- a/dagutils/utils.go +++ b/dagutils/utils.go @@ -4,15 +4,15 @@ import ( "context" "errors" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" syncds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // Editor represents a ProtoNode tree editor and provides methods to diff --git a/dagutils/utils_test.go b/dagutils/utils_test.go index ebc5b8ca8e5..c5ab7266760 100644 --- a/dagutils/utils_test.go +++ b/dagutils/utils_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - mdtest "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag/test" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + mdtest "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag/test" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func TestAddLink(t *testing.T) { @@ -41,7 +41,7 @@ func TestAddLink(t *testing.T) { } } -func assertNodeAtPath(t *testing.T, ds ipld.DAGService, root *dag.ProtoNode, pth string, exp *cid.Cid) { +func assertNodeAtPath(t *testing.T, ds ipld.DAGService, root *dag.ProtoNode, pth string, exp cid.Cid) { parts := path.SplitList(pth) cur := root for _, e := range parts { diff --git a/exchange/reprovide/providers.go b/exchange/reprovide/providers.go index c3ff84b86b4..57a675d4791 100644 --- a/exchange/reprovide/providers.go +++ b/exchange/reprovide/providers.go @@ -5,29 +5,29 @@ import ( pin "github.com/ipfs/go-ipfs/pin" - merkledag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - cidutil "gx/ipfs/QmPyxJ2QS7L5FhGkNYkNcXHGjDhvGHueJ4auqAstFHYxy5/go-cidutil" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blocks "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + cidutil "gx/ipfs/QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt/go-cidutil" + merkledag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + blocks "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // NewBlockstoreProvider returns key provider using bstore.AllKeysChan func NewBlockstoreProvider(bstore blocks.Blockstore) KeyChanFunc { - return func(ctx context.Context) (<-chan *cid.Cid, error) { + return func(ctx context.Context) (<-chan cid.Cid, error) { return bstore.AllKeysChan(ctx) } } // NewPinnedProvider returns provider supplying pinned keys func NewPinnedProvider(pinning pin.Pinner, dag ipld.DAGService, onlyRoots bool) KeyChanFunc { - return func(ctx context.Context) (<-chan *cid.Cid, error) { + return func(ctx context.Context) (<-chan cid.Cid, error) { set, err := pinSet(ctx, pinning, dag, onlyRoots) if err != nil { return nil, err } - outCh := make(chan *cid.Cid) + outCh := make(chan cid.Cid) go func() { defer close(outCh) for c := range set.New { diff --git a/exchange/reprovide/reprovide.go b/exchange/reprovide/reprovide.go index 11f00daf3f3..0038faf5021 100644 --- a/exchange/reprovide/reprovide.go +++ b/exchange/reprovide/reprovide.go @@ -6,16 +6,16 @@ import ( "time" backoff "gx/ipfs/QmPJUtEJsm5YLUWhF6imvyCH8KZXRJa9Wup7FDMwTy5Ufz/backoff" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - "gx/ipfs/QmVUhfewLZpSaAiBYCpw2krYMaiVmFuhr2iurQLuRoU6sD/go-verifcid" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" ) var log = logging.Logger("reprovider") //KeyChanFunc is function streaming CIDs to pass to content routing -type KeyChanFunc func(context.Context) (<-chan *cid.Cid, error) +type KeyChanFunc func(context.Context) (<-chan cid.Cid, error) type doneFunc func(error) type Reprovider struct { diff --git a/exchange/reprovide/reprovide_test.go b/exchange/reprovide/reprovide_test.go index fc7c601956c..7b3b0cacf06 100644 --- a/exchange/reprovide/reprovide_test.go +++ b/exchange/reprovide/reprovide_test.go @@ -5,12 +5,12 @@ import ( "testing" testutil "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil" - mock "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/mock" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + mock "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/mock" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" . "github.com/ipfs/go-ipfs/exchange/reprovide" ) diff --git a/filestore/filestore.go b/filestore/filestore.go index a24839d2ed4..596e2b4887b 100644 --- a/filestore/filestore.go +++ b/filestore/filestore.go @@ -11,12 +11,12 @@ import ( "context" "errors" + posinfo "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" dsq "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/query" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - posinfo "gx/ipfs/QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU/go-ipfs-posinfo" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) var log = logging.Logger("filestore") @@ -49,7 +49,7 @@ func NewFilestore(bs blockstore.Blockstore, fm *FileManager) *Filestore { // AllKeysChan returns a channel from which to read the keys stored in // the blockstore. If the given context is cancelled the channel will be closed. -func (f *Filestore) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) { +func (f *Filestore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) { ctx, cancel := context.WithCancel(ctx) a, err := f.bs.AllKeysChan(ctx) @@ -58,7 +58,7 @@ func (f *Filestore) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) { return nil, err } - out := make(chan *cid.Cid, dsq.KeysOnlyBufSize) + out := make(chan cid.Cid, dsq.KeysOnlyBufSize) go func() { defer cancel() defer close(out) @@ -115,7 +115,7 @@ func (f *Filestore) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) { // blockstore. As expected, in the case of FileManager blocks, only the // reference is deleted, not its contents. It may return // ErrNotFound when the block is not stored. -func (f *Filestore) DeleteBlock(c *cid.Cid) error { +func (f *Filestore) DeleteBlock(c cid.Cid) error { err1 := f.bs.DeleteBlock(c) if err1 != nil && err1 != blockstore.ErrNotFound { return err1 @@ -140,7 +140,7 @@ func (f *Filestore) DeleteBlock(c *cid.Cid) error { // Get retrieves the block with the given Cid. It may return // ErrNotFound when the block is not stored. -func (f *Filestore) Get(c *cid.Cid) (blocks.Block, error) { +func (f *Filestore) Get(c cid.Cid) (blocks.Block, error) { blk, err := f.bs.Get(c) switch err { case nil: @@ -154,7 +154,7 @@ func (f *Filestore) Get(c *cid.Cid) (blocks.Block, error) { // GetSize returns the size of the requested block. It may return ErrNotFound // when the block is not stored. -func (f *Filestore) GetSize(c *cid.Cid) (int, error) { +func (f *Filestore) GetSize(c cid.Cid) (int, error) { size, err := f.bs.GetSize(c) switch err { case nil: @@ -168,7 +168,7 @@ func (f *Filestore) GetSize(c *cid.Cid) (int, error) { // Has returns true if the block with the given Cid is // stored in the Filestore. -func (f *Filestore) Has(c *cid.Cid) (bool, error) { +func (f *Filestore) Has(c cid.Cid) (bool, error) { has, err := f.bs.Has(c) if err != nil { return false, err diff --git a/filestore/filestore_test.go b/filestore/filestore_test.go index 83eeb69b9f0..425bbf55499 100644 --- a/filestore/filestore_test.go +++ b/filestore/filestore_test.go @@ -7,12 +7,12 @@ import ( "math/rand" "testing" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + posinfo "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" - posinfo "gx/ipfs/QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU/go-ipfs-posinfo" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) func newTestFilestore(t *testing.T) (string, *Filestore) { @@ -55,7 +55,7 @@ func TestBasicFilestore(t *testing.T) { t.Fatal(err) } - var cids []*cid.Cid + var cids []cid.Cid for i := 0; i < 100; i++ { n := &posinfo.FilestoreNode{ PosInfo: &posinfo.PosInfo{ @@ -104,7 +104,7 @@ func TestBasicFilestore(t *testing.T) { } } -func randomFileAdd(t *testing.T, fs *Filestore, dir string, size int) (string, []*cid.Cid) { +func randomFileAdd(t *testing.T, fs *Filestore, dir string, size int) (string, []cid.Cid) { buf := make([]byte, size) rand.Read(buf) @@ -113,7 +113,7 @@ func randomFileAdd(t *testing.T, fs *Filestore, dir string, size int) (string, [ t.Fatal(err) } - var out []*cid.Cid + var out []cid.Cid for i := 0; i < size/10; i++ { n := &posinfo.FilestoreNode{ PosInfo: &posinfo.PosInfo{ diff --git a/filestore/fsrefstore.go b/filestore/fsrefstore.go index 87ceda15d97..8bf001af94c 100644 --- a/filestore/fsrefstore.go +++ b/filestore/fsrefstore.go @@ -10,15 +10,15 @@ import ( pb "github.com/ipfs/go-ipfs/filestore/pb" + posinfo "gx/ipfs/QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H/go-ipfs-posinfo" + dshelp "gx/ipfs/QmPQ7bVbZAbGaJkBVJeTkkKXvLLZeN9CLWTf5fzUQ8yeWs/go-ipfs-ds-help" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dsns "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/namespace" dsq "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/query" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - posinfo "gx/ipfs/QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU/go-ipfs-posinfo" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" - dshelp "gx/ipfs/Qmf1xGr3SyBpiPp3ZDuKkYMh4gnRk9K4QnbL17kstnf35h/go-ipfs-ds-help" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // FilestorePrefix identifies the key prefix for FileManager blocks. @@ -60,7 +60,7 @@ func NewFileManager(ds ds.Batching, root string) *FileManager { // AllKeysChan returns a channel from which to read the keys stored in // the FileManager. If the given context is cancelled the channel will be // closed. -func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) { +func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error) { q := dsq.Query{KeysOnly: true} res, err := f.ds.Query(q) @@ -68,7 +68,7 @@ func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) return nil, err } - out := make(chan *cid.Cid, dsq.KeysOnlyBufSize) + out := make(chan cid.Cid, dsq.KeysOnlyBufSize) go func() { defer close(out) for { @@ -97,7 +97,7 @@ func (f *FileManager) AllKeysChan(ctx context.Context) (<-chan *cid.Cid, error) // DeleteBlock deletes the reference-block from the underlying // datastore. It does not touch the referenced data. -func (f *FileManager) DeleteBlock(c *cid.Cid) error { +func (f *FileManager) DeleteBlock(c cid.Cid) error { err := f.ds.Delete(dshelp.CidToDsKey(c)) if err == ds.ErrNotFound { return blockstore.ErrNotFound @@ -109,7 +109,7 @@ func (f *FileManager) DeleteBlock(c *cid.Cid) error { // is done in two steps: the first step retrieves the reference // block from the datastore. The second step uses the stored // path and offsets to read the raw block data directly from disk. -func (f *FileManager) Get(c *cid.Cid) (blocks.Block, error) { +func (f *FileManager) Get(c cid.Cid) (blocks.Block, error) { dobj, err := f.getDataObj(c) if err != nil { return nil, err @@ -126,7 +126,7 @@ func (f *FileManager) Get(c *cid.Cid) (blocks.Block, error) { // // This method may successfully return the size even if returning the block // would fail because the associated file is no longer available. -func (f *FileManager) GetSize(c *cid.Cid) (int, error) { +func (f *FileManager) GetSize(c cid.Cid) (int, error) { dobj, err := f.getDataObj(c) if err != nil { return -1, err @@ -134,14 +134,14 @@ func (f *FileManager) GetSize(c *cid.Cid) (int, error) { return int(dobj.GetSize_()), nil } -func (f *FileManager) readDataObj(c *cid.Cid, d *pb.DataObj) ([]byte, error) { +func (f *FileManager) readDataObj(c cid.Cid, d *pb.DataObj) ([]byte, error) { if IsURL(d.GetFilePath()) { return f.readURLDataObj(c, d) } return f.readFileDataObj(c, d) } -func (f *FileManager) getDataObj(c *cid.Cid) (*pb.DataObj, error) { +func (f *FileManager) getDataObj(c cid.Cid) (*pb.DataObj, error) { o, err := f.ds.Get(dshelp.CidToDsKey(c)) switch err { case ds.ErrNotFound: @@ -164,7 +164,7 @@ func unmarshalDataObj(data []byte) (*pb.DataObj, error) { return &dobj, nil } -func (f *FileManager) readFileDataObj(c *cid.Cid, d *pb.DataObj) ([]byte, error) { +func (f *FileManager) readFileDataObj(c cid.Cid, d *pb.DataObj) ([]byte, error) { if !f.AllowFiles { return nil, ErrFilestoreNotEnabled } @@ -207,7 +207,7 @@ func (f *FileManager) readFileDataObj(c *cid.Cid, d *pb.DataObj) ([]byte, error) } // reads and verifies the block from URL -func (f *FileManager) readURLDataObj(c *cid.Cid, d *pb.DataObj) ([]byte, error) { +func (f *FileManager) readURLDataObj(c cid.Cid, d *pb.DataObj) ([]byte, error) { if !f.AllowUrls { return nil, ErrUrlstoreNotEnabled } @@ -252,7 +252,7 @@ func (f *FileManager) readURLDataObj(c *cid.Cid, d *pb.DataObj) ([]byte, error) // Has returns if the FileManager is storing a block reference. It does not // validate the data, nor checks if the reference is valid. -func (f *FileManager) Has(c *cid.Cid) (bool, error) { +func (f *FileManager) Has(c cid.Cid) (bool, error) { // NOTE: interesting thing to consider. Has doesnt validate the data. // So the data on disk could be invalid, and we could think we have it. dsk := dshelp.CidToDsKey(c) diff --git a/filestore/util.go b/filestore/util.go index ea7f06ff033..60a2a72d76f 100644 --- a/filestore/util.go +++ b/filestore/util.go @@ -6,11 +6,11 @@ import ( pb "github.com/ipfs/go-ipfs/filestore/pb" + dshelp "gx/ipfs/QmPQ7bVbZAbGaJkBVJeTkkKXvLLZeN9CLWTf5fzUQ8yeWs/go-ipfs-ds-help" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dsq "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/query" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" - dshelp "gx/ipfs/Qmf1xGr3SyBpiPp3ZDuKkYMh4gnRk9K4QnbL17kstnf35h/go-ipfs-ds-help" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) // Status is used to identify the state of the block data referenced @@ -60,7 +60,7 @@ func (s Status) Format() string { type ListRes struct { Status Status ErrorMsg string - Key *cid.Cid + Key cid.Cid FilePath string Offset uint64 Size uint64 @@ -69,7 +69,7 @@ type ListRes struct { // FormatLong returns a human readable string for a ListRes object. func (r *ListRes) FormatLong() string { switch { - case r.Key == nil: + case !r.Key.Defined(): return "" case r.FilePath == "": return r.Key.String() @@ -82,7 +82,7 @@ func (r *ListRes) FormatLong() string { // of the given Filestore and returns a ListRes object with the information. // List does not verify that the reference is valid or whether the // raw data is accesible. See Verify(). -func List(fs *Filestore, key *cid.Cid) *ListRes { +func List(fs *Filestore, key cid.Cid) *ListRes { return list(fs, false, key) } @@ -101,7 +101,7 @@ func ListAll(fs *Filestore, fileOrder bool) (func() *ListRes, error) { // of the given Filestore and returns a ListRes object with the information. // Verify makes sure that the reference is valid and the block data can be // read. -func Verify(fs *Filestore, key *cid.Cid) *ListRes { +func Verify(fs *Filestore, key cid.Cid) *ListRes { return list(fs, true, key) } @@ -116,7 +116,7 @@ func VerifyAll(fs *Filestore, fileOrder bool) (func() *ListRes, error) { return listAll(fs, true) } -func list(fs *Filestore, verify bool, key *cid.Cid) *ListRes { +func list(fs *Filestore, verify bool, key cid.Cid) *ListRes { dobj, err := fs.fm.getDataObj(key) if err != nil { return mkListRes(key, nil, err) @@ -145,16 +145,16 @@ func listAll(fs *Filestore, verify bool) (func() *ListRes, error) { }, nil } -func next(qr dsq.Results) (*cid.Cid, *pb.DataObj, error) { +func next(qr dsq.Results) (cid.Cid, *pb.DataObj, error) { v, ok := qr.NextSync() if !ok { - return nil, nil, nil + return cid.Cid{}, nil, nil } k := ds.RawKey(v.Key) c, err := dshelp.DsKeyToCid(k) if err != nil { - return nil, nil, fmt.Errorf("decoding cid from filestore: %s", err) + return cid.Cid{}, nil, fmt.Errorf("decoding cid from filestore: %s", err) } dobj, err := unmarshalDataObj(v.Value) @@ -252,7 +252,7 @@ func (l listEntries) Less(i, j int) bool { return l[i].filePath < l[j].filePath } -func mkListRes(c *cid.Cid, d *pb.DataObj, err error) *ListRes { +func mkListRes(c cid.Cid, d *pb.DataObj, err error) *ListRes { status := StatusOk errorMsg := "" if err != nil { diff --git a/fuse/ipns/common.go b/fuse/ipns/common.go index 6bbc6db5d2f..963eb276ef5 100644 --- a/fuse/ipns/common.go +++ b/fuse/ipns/common.go @@ -5,9 +5,9 @@ import ( "github.com/ipfs/go-ipfs/core" nsys "github.com/ipfs/go-ipfs/namesys" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) // InitializeKeyspace sets the ipns record for the given key to diff --git a/fuse/ipns/ipns_test.go b/fuse/ipns/ipns_test.go index 3d0f3b7df62..82af7d32216 100644 --- a/fuse/ipns/ipns_test.go +++ b/fuse/ipns/ipns_test.go @@ -17,8 +17,8 @@ import ( u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" ci "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil/ci" - offroute "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" fstest "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs/fstestutil" + offroute "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" racedet "gx/ipfs/Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF/go-detect-race" ) diff --git a/fuse/ipns/ipns_unix.go b/fuse/ipns/ipns_unix.go index 4d5bfea093d..08e7a18ab9d 100644 --- a/fuse/ipns/ipns_unix.go +++ b/fuse/ipns/ipns_unix.go @@ -13,17 +13,17 @@ import ( core "github.com/ipfs/go-ipfs/core" namesys "github.com/ipfs/go-ipfs/namesys" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" - mfs "gx/ipfs/QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ/go-mfs" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" + mfs "gx/ipfs/QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t/go-mfs" fuse "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse" fs "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" ) func init() { @@ -84,7 +84,7 @@ type Root struct { } func ipnsPubFunc(ipfs *core.IpfsNode, k ci.PrivKey) mfs.PubFunc { - return func(ctx context.Context, c *cid.Cid) error { + return func(ctx context.Context, c cid.Cid) error { return ipfs.Namesys.Publish(ctx, k, path.FromCid(c)) } } diff --git a/fuse/node/mount_test.go b/fuse/node/mount_test.go index 480c625f95f..2361e3ead9b 100644 --- a/fuse/node/mount_test.go +++ b/fuse/node/mount_test.go @@ -17,7 +17,7 @@ import ( namesys "github.com/ipfs/go-ipfs/namesys" ci "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil/ci" - offroute "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + offroute "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" ) func maybeSkipFuseTests(t *testing.T) { diff --git a/fuse/readonly/ipfs_test.go b/fuse/readonly/ipfs_test.go index 7b8841ebba8..2113ec978c7 100644 --- a/fuse/readonly/ipfs_test.go +++ b/fuse/readonly/ipfs_test.go @@ -16,15 +16,15 @@ import ( core "github.com/ipfs/go-ipfs/core" coreunix "github.com/ipfs/go-ipfs/core/coreunix" coremock "github.com/ipfs/go-ipfs/core/mock" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - importer "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + importer "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" ci "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil/ci" fstest "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs/fstestutil" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - chunker "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" ) func maybeSkipFuseTests(t *testing.T) { diff --git a/fuse/readonly/readonly_unix.go b/fuse/readonly/readonly_unix.go index 7967c34832d..27aedfe9d4a 100644 --- a/fuse/readonly/readonly_unix.go +++ b/fuse/readonly/readonly_unix.go @@ -11,16 +11,16 @@ import ( "syscall" core "github.com/ipfs/go-ipfs/core" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - mdag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" - ftpb "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/pb" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + ftpb "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/pb" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + mdag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" fuse "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse" fs "gx/ipfs/QmSJBsmLP1XMjv8hxYg2rUMdPDB7YUpyBo9idjrJ6Cmq6F/fuse/fs" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" lgbl "gx/ipfs/QmZ4zF1mBrt8C2mSCM4ZYE4aAnv78f7GvrzufJC4G5tecK/go-libp2p-loggables" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" ) diff --git a/namesys/base.go b/namesys/base.go index 0047b434e38..d7b87b36a52 100644 --- a/namesys/base.go +++ b/namesys/base.go @@ -7,7 +7,7 @@ import ( context "context" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) type resolver interface { diff --git a/namesys/cache.go b/namesys/cache.go index 451521be427..f908270914c 100644 --- a/namesys/cache.go +++ b/namesys/cache.go @@ -3,7 +3,7 @@ package namesys import ( "time" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ) func (ns *mpns) cacheGet(name string) (path.Path, bool) { diff --git a/namesys/dns.go b/namesys/dns.go index 4961c72d9c0..ec36b7f1a99 100644 --- a/namesys/dns.go +++ b/namesys/dns.go @@ -8,7 +8,7 @@ import ( "time" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" isd "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain" ) diff --git a/namesys/interface.go b/namesys/interface.go index a638b5f8176..87e0f1abfd3 100644 --- a/namesys/interface.go +++ b/namesys/interface.go @@ -36,7 +36,7 @@ import ( context "context" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" ) diff --git a/namesys/ipns_resolver_validation_test.go b/namesys/ipns_resolver_validation_test.go index c5eda173782..f796f7ac225 100644 --- a/namesys/ipns_resolver_validation_test.go +++ b/namesys/ipns_resolver_validation_test.go @@ -6,20 +6,20 @@ import ( "time" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" u "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" testutil "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil" - mockrouting "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/mock" - offline "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + mockrouting "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/mock" + offline "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - ropts "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing/options" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" record "gx/ipfs/QmdHb9aBELnQKTVhvvA3hsQbRgUAwsWUzBP2vZ6Y5FBYvE/go-libp2p-record" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" + ropts "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing/options" pstore "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore" pstoremem "gx/ipfs/Qmda4cPRvSRyox3SqgJN6DfSZGU5TtHufPTp9uXjFj71X6/go-libp2p-peerstore/pstoremem" ) diff --git a/namesys/namesys.go b/namesys/namesys.go index 9b8e6bff62a..1b9a1574e5e 100644 --- a/namesys/namesys.go +++ b/namesys/namesys.go @@ -6,15 +6,15 @@ import ( "time" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" lru "gx/ipfs/QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK/golang-lru" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" isd "gx/ipfs/QmZmmuAXgX73UQmX1jRKjTGmjzq24Jinqkq8vzkBtno4uX/go-is-domain" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" ) // mpns (a multi-protocol NameSystem) implements generic IPFS naming. diff --git a/namesys/namesys_test.go b/namesys/namesys_test.go index cc213c9c5ce..e4ee7b2d339 100644 --- a/namesys/namesys_test.go +++ b/namesys/namesys_test.go @@ -7,12 +7,12 @@ import ( "time" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - offroute "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/offline" + offroute "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/offline" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" diff --git a/namesys/proquint.go b/namesys/proquint.go index 2778590e594..a0ad3ce656a 100644 --- a/namesys/proquint.go +++ b/namesys/proquint.go @@ -7,7 +7,7 @@ import ( context "context" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" proquint "gx/ipfs/QmYnf27kzqR2cxt6LFZdrAFJuQd6785fTkBvMuEj9EeRxM/proquint" ) diff --git a/namesys/publisher.go b/namesys/publisher.go index 79be29e0d85..8655d4ac759 100644 --- a/namesys/publisher.go +++ b/namesys/publisher.go @@ -7,16 +7,16 @@ import ( "time" pin "github.com/ipfs/go-ipfs/pin" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - ft "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs" + ft "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dsquery "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/query" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" pb "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns/pb" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" base32 "gx/ipfs/QmfVj3x4D6Jkq9SEoi5n2NmoUomLwoeiwnYz2KQa15wRw6/base32" ) diff --git a/namesys/publisher_test.go b/namesys/publisher_test.go index 5df344af922..3b444cab9ae 100644 --- a/namesys/publisher_test.go +++ b/namesys/publisher_test.go @@ -6,15 +6,15 @@ import ( "testing" "time" + dshelp "gx/ipfs/QmPQ7bVbZAbGaJkBVJeTkkKXvLLZeN9CLWTf5fzUQ8yeWs/go-ipfs-ds-help" ci "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" testutil "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil" - mockrouting "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/mock" + mockrouting "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/mock" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" ma "gx/ipfs/QmYmsdtJ3HsodkePE3eU3TsCaP2YvPZJ4LoXnNkDE5Tpt7/go-multiaddr" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" - dshelp "gx/ipfs/Qmf1xGr3SyBpiPp3ZDuKkYMh4gnRk9K4QnbL17kstnf35h/go-ipfs-ds-help" ) type identity struct { diff --git a/namesys/republisher/repub.go b/namesys/republisher/repub.go index 29a5fa745b5..8ee200295c7 100644 --- a/namesys/republisher/repub.go +++ b/namesys/republisher/repub.go @@ -7,7 +7,7 @@ import ( keystore "github.com/ipfs/go-ipfs/keystore" namesys "github.com/ipfs/go-ipfs/namesys" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" ic "gx/ipfs/QmPvyPwuCgJ7pDmrKDxRtsScJgBaM5h4EpRL2qQJsmXf4n/go-libp2p-crypto" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" diff --git a/namesys/republisher/repub_test.go b/namesys/republisher/repub_test.go index be62d10cb61..babdd9d548f 100644 --- a/namesys/republisher/repub_test.go +++ b/namesys/republisher/repub_test.go @@ -10,7 +10,7 @@ import ( mock "github.com/ipfs/go-ipfs/core/mock" namesys "github.com/ipfs/go-ipfs/namesys" . "github.com/ipfs/go-ipfs/namesys/republisher" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" goprocess "gx/ipfs/QmSF8fPo3jgVBAy8fpdjjYqgG87dkJgUprRBHRd2tmfgpP/goprocess" mocknet "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/net/mock" diff --git a/namesys/resolve_test.go b/namesys/resolve_test.go index b865988277c..b0351214b6d 100644 --- a/namesys/resolve_test.go +++ b/namesys/resolve_test.go @@ -6,11 +6,11 @@ import ( "testing" "time" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" testutil "gx/ipfs/QmRNhSdqzMcuRxX9A1egBeQ3BhDTguDV5HPwi8wRykkPU8/go-testutil" - mockrouting "gx/ipfs/QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN/go-ipfs-routing/mock" + mockrouting "gx/ipfs/QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj/go-ipfs-routing/mock" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" diff --git a/namesys/routing.go b/namesys/routing.go index 49365728134..8d78617997b 100644 --- a/namesys/routing.go +++ b/namesys/routing.go @@ -6,16 +6,16 @@ import ( "time" opts "github.com/ipfs/go-ipfs/namesys/opts" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" peer "gx/ipfs/QmQsErDt8Qgw1XrsXf2BpEzDgGWtB1YLsTAARBup5b6B9W/go-libp2p-peer" - dht "gx/ipfs/QmRNxiPpZf3skMAtmDJpgHuW9uj1ukqV1zjANj9d6bmHfE/go-libp2p-kad-dht" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - routing "gx/ipfs/QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU/go-libp2p-routing" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + dht "gx/ipfs/QmaXYSwxqJsX3EoGb1ZV2toZ9fXc8hWJPaBW1XAp1h2Tsp/go-libp2p-kad-dht" ipns "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns" pb "gx/ipfs/QmbUUxB9ErnEQdwTzy6HTxucnBvAH4am6vsfbD8CiqKhi9/go-ipns/pb" + routing "gx/ipfs/QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch/go-libp2p-routing" proto "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" ) diff --git a/package.json b/package.json index c49cd25abd8..f43c90269e2 100644 --- a/package.json +++ b/package.json @@ -130,9 +130,9 @@ }, { "author": "whyrusleeping", - "hash": "QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb", + "hash": "QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7", "name": "go-cid", - "version": "0.8.0" + "version": "0.9.0" }, { "author": "whyrusleeping", @@ -171,9 +171,9 @@ "version": "0.2.0" }, { - "hash": "QmRNxiPpZf3skMAtmDJpgHuW9uj1ukqV1zjANj9d6bmHfE", + "hash": "QmaXYSwxqJsX3EoGb1ZV2toZ9fXc8hWJPaBW1XAp1h2Tsp", "name": "go-libp2p-kad-dht", - "version": "4.3.9" + "version": "4.4.0" }, { "author": "whyrusleeping", @@ -189,15 +189,15 @@ }, { "author": "whyrusleeping", - "hash": "QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC", + "hash": "QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL", "name": "go-ipld-format", - "version": "0.5.8" + "version": "0.6.0" }, { "author": "whyrusleeping", - "hash": "QmepvyyduWnXHm1G7ybmGbJfQQHTAo36DjP2nvF7H7ZXjE", + "hash": "QmPrv66vmh2P7vLJMpYx6DWLTNKvVB4Jdkyxs6V3QvWKvf", "name": "go-ipld-cbor", - "version": "1.2.17" + "version": "1.3.0" }, { "author": "lgierth", @@ -247,9 +247,9 @@ }, { "author": "whyrusleeping", - "hash": "QmSbvata2WqNkqGtZNg8MR3SKwnB8iQ7vTPJgWqB8bC5kR", + "hash": "QmekxXDhCxCJRNuzmHreuaT3BsuJcsjcXWNrtV9C8DRHtd", "name": "go-multibase", - "version": "0.2.7" + "version": "0.3.0" }, { "author": "multiformats", @@ -328,20 +328,20 @@ }, { "author": "stebalien", - "hash": "QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3", + "hash": "QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM", "name": "go-block-format", - "version": "0.1.11" + "version": "0.2.0" }, { - "hash": "QmY9JUvS8kbgao3XbPh6WAV3ChE2nxGKhcGTHiwMC4gmcU", + "hash": "QmdKS5YtmuSWKuLLgbHG176mS3VX3AKiyVmaaiAfvgcuch", "name": "go-libp2p-routing", - "version": "2.4.10" + "version": "2.5.0" }, { "author": "whyrusleeping", - "hash": "QmTH9uimkEFHc7HcrFSG2pMskWLSfnRb8HKUngiP7r4iDN", + "hash": "QmRNxeMQs2eVPouLxwa4tN72yTLLgWAi1cChXqgdEz5Ko4", "name": "go-ipld-git", - "version": "0.2.5" + "version": "0.3.0" }, { "hash": "QmSW4uNHbvQia8iZDXzbwjiyHQtnyo9aFqfQAMasj3TJ6Y", @@ -398,15 +398,15 @@ }, { "author": "hector", - "hash": "QmXD4grfThQ4LwVoEEfe4dgR7ukmbV9TppM5Q4SPowp7hU", + "hash": "QmPG32VXR5jmpo9q8R9FNdR4Ae97Ky9CiZE6SctJLUB79H", "name": "go-ipfs-posinfo", - "version": "0.0.6" + "version": "0.1.0" }, { "author": "hsanjuan", - "hash": "QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK", + "hash": "QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm", "name": "go-ipfs-chunker", - "version": "0.0.11" + "version": "0.1.0" }, { "author": "jbenet", @@ -416,21 +416,21 @@ }, { "author": "hsanjuan", - "hash": "Qmf1xGr3SyBpiPp3ZDuKkYMh4gnRk9K4QnbL17kstnf35h", + "hash": "QmPQ7bVbZAbGaJkBVJeTkkKXvLLZeN9CLWTf5fzUQ8yeWs", "name": "go-ipfs-ds-help", - "version": "0.0.10" + "version": "0.1.1" }, { "author": "hsanjuan", - "hash": "QmRuUsZEg2WLCuidJGHVmE1NreHDmXWKLS466PKyDpXMhN", + "hash": "QmSNe4MWVxZWk6UxxW2z2EKofFo4GdFzud1vfn1iVby3mj", "name": "go-ipfs-routing", - "version": "0.0.25" + "version": "0.1.1" }, { "author": "hsanjuan", - "hash": "Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i", + "hash": "QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH", "name": "go-ipfs-blockstore", - "version": "0.0.20" + "version": "0.1.1" }, { "author": "whyrusleeping", @@ -452,27 +452,27 @@ }, { "author": "hsanjuan", - "hash": "QmWw71Mz9PXKgYG8ZfTYN7Ax2Zm48Eurbne3wC2y7CKmLz", + "hash": "QmR1nncPsZR14A4hWr39mq8Lm7BGgS68bHVT9nop8NpWEM", "name": "go-ipfs-exchange-interface", - "version": "0.0.6" + "version": "0.1.0" }, { "author": "hsanjuan", - "hash": "QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r", + "hash": "QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T", "name": "go-ipfs-exchange-offline", - "version": "0.0.17" + "version": "0.1.1" }, { "author": "stebalien", - "hash": "QmbcvfZBCN6FmPsL8wJmJxefmMNtk55h3uB5YJgVeqjfpK", + "hash": "QmYz19WrC7TskcVrSbH6sdPd1PvPMAnM9dEUnSTz4pwCWG", "name": "go-libp2p-pubsub-router", - "version": "0.3.17" + "version": "0.4.1" }, { "author": "Stebalien", - "hash": "QmUy9RAnhX9LBEUbhg8mvrouMRsoF27ycvT2iZsSG8V7Sv", + "hash": "QmSFHnkFwayfnRKK1Z8jBUauMYMkHrZpQyvbxkFoPYb1VQ", "name": "go-libp2p-routing-helpers", - "version": "0.2.11" + "version": "0.3.0" }, { "author": "fsnotify", @@ -488,33 +488,33 @@ }, { "author": "why", - "hash": "QmVDDgboX5nPUE4pBcK2xC1b9XbStA4t2KrUWBRMr9AiFd", + "hash": "QmUyaGN3WPr3CTLai7DBvMikagK45V4fUi8p8cNRaJQoU1", "name": "go-bitswap", - "version": "1.0.15" + "version": "1.1.1" }, { "author": "why", - "hash": "QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77", + "hash": "Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3", "name": "go-blockservice", - "version": "1.0.14" + "version": "1.1.1" }, { "author": "why", - "hash": "QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a", + "hash": "QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM", "name": "go-merkledag", - "version": "1.0.14" + "version": "1.1.1" }, { "author": "why", - "hash": "QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM", + "hash": "QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A", "name": "go-path", - "version": "1.0.14" + "version": "1.1.1" }, { "author": "why", - "hash": "QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59", + "hash": "QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2", "name": "go-unixfs", - "version": "1.0.16" + "version": "1.1.1" }, { "author": "magik6k", @@ -524,21 +524,21 @@ }, { "author": "why", - "hash": "QmVUhfewLZpSaAiBYCpw2krYMaiVmFuhr2iurQLuRoU6sD", + "hash": "QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT", "name": "go-verifcid", - "version": "0.0.4" + "version": "0.1.0" }, { "author": "hsanjuan", - "hash": "QmPcR9Eft4i3XU5DXdnmNY8SWRuFnJms58NKjY1Hso8WiQ", + "hash": "QmRkrpnhZqDxTxwGCsDbuZMr7uCFZHH6SGfrcjgEQwxF3t", "name": "go-mfs", - "version": "0.0.6" + "version": "0.1.1" }, { "author": "kevina", - "hash": "QmPyxJ2QS7L5FhGkNYkNcXHGjDhvGHueJ4auqAstFHYxy5", + "hash": "QmQJSeE3CX4zos9qeaG8EhecEK9zvrTEfTG84J8C5NVRwt", "name": "go-cidutil", - "version": "0.0.2" + "version": "0.1.1" }, { "author": "lgierth", diff --git a/pin/gc/gc.go b/pin/gc/gc.go index 9628f7ad70e..f79d11ebd5a 100644 --- a/pin/gc/gc.go +++ b/pin/gc/gc.go @@ -8,16 +8,16 @@ import ( "strings" pin "github.com/ipfs/go-ipfs/pin" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" dstore "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" - "gx/ipfs/QmVUhfewLZpSaAiBYCpw2krYMaiVmFuhr2iurQLuRoU6sD/go-verifcid" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) var log = logging.Logger("gc") @@ -25,7 +25,7 @@ var log = logging.Logger("gc") // Result represents an incremental output from a garbage collection // run. It contains either an error, or the cid of a removed object. type Result struct { - KeyRemoved *cid.Cid + KeyRemoved cid.Cid Error error } @@ -38,7 +38,7 @@ type Result struct { // // The routine then iterates over every block in the blockstore and // deletes any block that is not found in the marked set. -func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn pin.Pinner, bestEffortRoots []*cid.Cid) <-chan Result { +func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn pin.Pinner, bestEffortRoots []cid.Cid) <-chan Result { elock := log.EventBegin(ctx, "GC.lockWait") unlocker := bs.GCLock() @@ -130,8 +130,8 @@ func GC(ctx context.Context, bs bstore.GCBlockstore, dstor dstore.Datastore, pn // Descendants recursively finds all the descendants of the given roots and // adds them to the given cid.Set, using the provided dag.GetLinks function // to walk the tree. -func Descendants(ctx context.Context, getLinks dag.GetLinks, set *cid.Set, roots []*cid.Cid) error { - verifyGetLinks := func(ctx context.Context, c *cid.Cid) ([]*ipld.Link, error) { +func Descendants(ctx context.Context, getLinks dag.GetLinks, set *cid.Set, roots []cid.Cid) error { + verifyGetLinks := func(ctx context.Context, c cid.Cid) ([]*ipld.Link, error) { err := verifcid.ValidateCid(c) if err != nil { return nil, err @@ -168,12 +168,12 @@ func Descendants(ctx context.Context, getLinks dag.GetLinks, set *cid.Set, roots // ColoredSet computes the set of nodes in the graph that are pinned by the // pins in the given pinner. -func ColoredSet(ctx context.Context, pn pin.Pinner, ng ipld.NodeGetter, bestEffortRoots []*cid.Cid, output chan<- Result) (*cid.Set, error) { +func ColoredSet(ctx context.Context, pn pin.Pinner, ng ipld.NodeGetter, bestEffortRoots []cid.Cid, output chan<- Result) (*cid.Set, error) { // KeySet currently implemented in memory, in the future, may be bloom filter or // disk backed to conserve memory. errors := false gcs := cid.NewSet() - getLinks := func(ctx context.Context, cid *cid.Cid) ([]*ipld.Link, error) { + getLinks := func(ctx context.Context, cid cid.Cid) ([]*ipld.Link, error) { links, err := ipld.GetLinks(ctx, ng, cid) if err != nil { errors = true @@ -187,7 +187,7 @@ func ColoredSet(ctx context.Context, pn pin.Pinner, ng ipld.NodeGetter, bestEffo output <- Result{Error: err} } - bestEffortGetLinks := func(ctx context.Context, cid *cid.Cid) ([]*ipld.Link, error) { + bestEffortGetLinks := func(ctx context.Context, cid cid.Cid) ([]*ipld.Link, error) { links, err := ipld.GetLinks(ctx, ng, cid) if err != nil && err != ipld.ErrNotFound { errors = true @@ -230,7 +230,7 @@ var ErrCannotDeleteSomeBlocks = errors.New("garbage collection incomplete: could // CannotFetchLinksError provides detailed information about which links // could not be fetched and can appear as a Result in the GC output channel. type CannotFetchLinksError struct { - Key *cid.Cid + Key cid.Cid Err error } @@ -244,7 +244,7 @@ func (e *CannotFetchLinksError) Error() string { // blocks could not be deleted and can appear as a Result in the GC output // channel. type CannotDeleteBlockError struct { - Key *cid.Cid + Key cid.Cid Err error } diff --git a/pin/pin.go b/pin/pin.go index cff9e4ae5bb..692ae24d709 100644 --- a/pin/pin.go +++ b/pin/pin.go @@ -10,19 +10,19 @@ import ( "time" "github.com/ipfs/go-ipfs/dagutils" - mdag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + mdag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) var log = logging.Logger("pin") var pinDatastoreKey = ds.NewKey("/local/pins") -var emptyKey *cid.Cid +var emptyKey cid.Cid func init() { e, err := cid.Decode("QmdfTbBqBPQ7VNxZEYEj14VmRuZBkqFbiwReogJgS1zR1n") @@ -105,50 +105,50 @@ func StringToMode(s string) (Mode, bool) { type Pinner interface { // IsPinned returns whether or not the given cid is pinned // and an explanation of why its pinned - IsPinned(*cid.Cid) (string, bool, error) + IsPinned(cid.Cid) (string, bool, error) // IsPinnedWithType returns whether or not the given cid is pinned with the // given pin type, as well as returning the type of pin its pinned with. - IsPinnedWithType(*cid.Cid, Mode) (string, bool, error) + IsPinnedWithType(cid.Cid, Mode) (string, bool, error) // Pin the given node, optionally recursively. Pin(ctx context.Context, node ipld.Node, recursive bool) error // Unpin the given cid. If recursive is true, removes either a recursive or // a direct pin. If recursive is false, only removes a direct pin. - Unpin(ctx context.Context, cid *cid.Cid, recursive bool) error + Unpin(ctx context.Context, cid cid.Cid, recursive bool) error // Update updates a recursive pin from one cid to another // this is more efficient than simply pinning the new one and unpinning the // old one - Update(ctx context.Context, from, to *cid.Cid, unpin bool) error + Update(ctx context.Context, from, to cid.Cid, unpin bool) error // Check if a set of keys are pinned, more efficient than // calling IsPinned for each key - CheckIfPinned(cids ...*cid.Cid) ([]Pinned, error) + CheckIfPinned(cids ...cid.Cid) ([]Pinned, error) // PinWithMode is for manually editing the pin structure. Use with // care! If used improperly, garbage collection may not be // successful. - PinWithMode(*cid.Cid, Mode) + PinWithMode(cid.Cid, Mode) // RemovePinWithMode is for manually editing the pin structure. // Use with care! If used improperly, garbage collection may not // be successful. - RemovePinWithMode(*cid.Cid, Mode) + RemovePinWithMode(cid.Cid, Mode) // Flush writes the pin state to the backing datastore Flush() error // DirectKeys returns all directly pinned cids - DirectKeys() []*cid.Cid + DirectKeys() []cid.Cid // DirectKeys returns all recursively pinned cids - RecursiveKeys() []*cid.Cid + RecursiveKeys() []cid.Cid // InternalPins returns all cids kept pinned for the internal state of the // pinner - InternalPins() []*cid.Cid + InternalPins() []cid.Cid } // Pinned represents CID which has been pinned with a pinning strategy. @@ -156,9 +156,9 @@ type Pinner interface { // case that the item is not pinned directly (but rather pinned recursively // by some ascendant). type Pinned struct { - Key *cid.Cid + Key cid.Cid Mode Mode - Via *cid.Cid + Via cid.Cid } // Pinned returns whether or not the given cid is pinned @@ -254,7 +254,7 @@ func (p *pinner) Pin(ctx context.Context, node ipld.Node, recurse bool) error { var ErrNotPinned = fmt.Errorf("not pinned") // Unpin a given key -func (p *pinner) Unpin(ctx context.Context, c *cid.Cid, recursive bool) error { +func (p *pinner) Unpin(ctx context.Context, c cid.Cid, recursive bool) error { p.lock.Lock() defer p.lock.Unlock() reason, pinned, err := p.isPinnedWithType(c, Any) @@ -279,13 +279,13 @@ func (p *pinner) Unpin(ctx context.Context, c *cid.Cid, recursive bool) error { } } -func (p *pinner) isInternalPin(c *cid.Cid) bool { +func (p *pinner) isInternalPin(c cid.Cid) bool { return p.internalPin.Has(c) } // IsPinned returns whether or not the given key is pinned // and an explanation of why its pinned -func (p *pinner) IsPinned(c *cid.Cid) (string, bool, error) { +func (p *pinner) IsPinned(c cid.Cid) (string, bool, error) { p.lock.RLock() defer p.lock.RUnlock() return p.isPinnedWithType(c, Any) @@ -293,7 +293,7 @@ func (p *pinner) IsPinned(c *cid.Cid) (string, bool, error) { // IsPinnedWithType returns whether or not the given cid is pinned with the // given pin type, as well as returning the type of pin its pinned with. -func (p *pinner) IsPinnedWithType(c *cid.Cid, mode Mode) (string, bool, error) { +func (p *pinner) IsPinnedWithType(c cid.Cid, mode Mode) (string, bool, error) { p.lock.RLock() defer p.lock.RUnlock() return p.isPinnedWithType(c, mode) @@ -301,7 +301,7 @@ func (p *pinner) IsPinnedWithType(c *cid.Cid, mode Mode) (string, bool, error) { // isPinnedWithType is the implementation of IsPinnedWithType that does not lock. // intended for use by other pinned methods that already take locks -func (p *pinner) isPinnedWithType(c *cid.Cid, mode Mode) (string, bool, error) { +func (p *pinner) isPinnedWithType(c cid.Cid, mode Mode) (string, bool, error) { switch mode { case Any, Direct, Indirect, Recursive, Internal: default: @@ -346,7 +346,7 @@ func (p *pinner) isPinnedWithType(c *cid.Cid, mode Mode) (string, bool, error) { // CheckIfPinned Checks if a set of keys are pinned, more efficient than // calling IsPinned for each key, returns the pinned status of cid(s) -func (p *pinner) CheckIfPinned(cids ...*cid.Cid) ([]Pinned, error) { +func (p *pinner) CheckIfPinned(cids ...cid.Cid) ([]Pinned, error) { p.lock.RLock() defer p.lock.RUnlock() pinned := make([]Pinned, 0, len(cids)) @@ -366,8 +366,8 @@ func (p *pinner) CheckIfPinned(cids ...*cid.Cid) ([]Pinned, error) { } // Now walk all recursive pins to check for indirect pins - var checkChildren func(*cid.Cid, *cid.Cid) error - checkChildren = func(rk, parentKey *cid.Cid) error { + var checkChildren func(cid.Cid, cid.Cid) error + checkChildren = func(rk, parentKey cid.Cid) error { links, err := ipld.GetLinks(context.TODO(), p.dserv, parentKey) if err != nil { return err @@ -414,7 +414,7 @@ func (p *pinner) CheckIfPinned(cids ...*cid.Cid) ([]Pinned, error) { // RemovePinWithMode is for manually editing the pin structure. // Use with care! If used improperly, garbage collection may not // be successful. -func (p *pinner) RemovePinWithMode(c *cid.Cid, mode Mode) { +func (p *pinner) RemovePinWithMode(c cid.Cid, mode Mode) { p.lock.Lock() defer p.lock.Unlock() switch mode { @@ -428,7 +428,7 @@ func (p *pinner) RemovePinWithMode(c *cid.Cid, mode Mode) { } } -func cidSetWithValues(cids []*cid.Cid) *cid.Set { +func cidSetWithValues(cids []cid.Cid) *cid.Set { out := cid.NewSet() for _, c := range cids { out.Add(c) @@ -493,19 +493,19 @@ func LoadPinner(d ds.Datastore, dserv, internal ipld.DAGService) (Pinner, error) } // DirectKeys returns a slice containing the directly pinned keys -func (p *pinner) DirectKeys() []*cid.Cid { +func (p *pinner) DirectKeys() []cid.Cid { return p.directPin.Keys() } // RecursiveKeys returns a slice containing the recursively pinned keys -func (p *pinner) RecursiveKeys() []*cid.Cid { +func (p *pinner) RecursiveKeys() []cid.Cid { return p.recursePin.Keys() } // Update updates a recursive pin from one cid to another // this is more efficient than simply pinning the new one and unpinning the // old one -func (p *pinner) Update(ctx context.Context, from, to *cid.Cid, unpin bool) error { +func (p *pinner) Update(ctx context.Context, from, to cid.Cid, unpin bool) error { p.lock.Lock() defer p.lock.Unlock() @@ -579,17 +579,17 @@ func (p *pinner) Flush() error { // InternalPins returns all cids kept pinned for the internal state of the // pinner -func (p *pinner) InternalPins() []*cid.Cid { +func (p *pinner) InternalPins() []cid.Cid { p.lock.Lock() defer p.lock.Unlock() - var out []*cid.Cid + var out []cid.Cid out = append(out, p.internalPin.Keys()...) return out } // PinWithMode allows the user to have fine grained control over pin // counts -func (p *pinner) PinWithMode(c *cid.Cid, mode Mode) { +func (p *pinner) PinWithMode(c cid.Cid, mode Mode) { p.lock.Lock() defer p.lock.Unlock() switch mode { @@ -602,7 +602,7 @@ func (p *pinner) PinWithMode(c *cid.Cid, mode Mode) { // hasChild recursively looks for a Cid among the children of a root Cid. // The visit function can be used to shortcut already-visited branches. -func hasChild(ng ipld.NodeGetter, root *cid.Cid, child *cid.Cid, visit func(*cid.Cid) bool) (bool, error) { +func hasChild(ng ipld.NodeGetter, root cid.Cid, child cid.Cid, visit func(cid.Cid) bool) (bool, error) { links, err := ipld.GetLinks(context.TODO(), ng, root) if err != nil { return false, err diff --git a/pin/pin_test.go b/pin/pin_test.go index 4dc5e3565ee..b54f8a1326b 100644 --- a/pin/pin_test.go +++ b/pin/pin_test.go @@ -5,20 +5,20 @@ import ( "testing" "time" - mdag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bs "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + mdag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bs "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" util "gx/ipfs/QmPdKqUcHGFdeSpvjVoaTRPPstGif9GBZb5Q56RVw9o69A/go-ipfs-util" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dssync "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/sync" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) var rand = util.NewTimeSeededRand() -func randNode() (*mdag.ProtoNode, *cid.Cid) { +func randNode() (*mdag.ProtoNode, cid.Cid) { nd := new(mdag.ProtoNode) nd.SetData(make([]byte, 32)) rand.Read(nd.Data()) @@ -26,7 +26,7 @@ func randNode() (*mdag.ProtoNode, *cid.Cid) { return nd, k } -func assertPinned(t *testing.T, p Pinner, c *cid.Cid, failmsg string) { +func assertPinned(t *testing.T, p Pinner, c cid.Cid, failmsg string) { _, pinned, err := p.IsPinned(c) if err != nil { t.Fatal(err) @@ -37,7 +37,7 @@ func assertPinned(t *testing.T, p Pinner, c *cid.Cid, failmsg string) { } } -func assertUnpinned(t *testing.T, p Pinner, c *cid.Cid, failmsg string) { +func assertUnpinned(t *testing.T, p Pinner, c cid.Cid, failmsg string) { _, pinned, err := p.IsPinned(c) if err != nil { t.Fatal(err) @@ -187,7 +187,7 @@ func TestIsPinnedLookup(t *testing.T) { p := NewPinner(dstore, dserv, dserv) aNodes := make([]*mdag.ProtoNode, aBranchLen) - aKeys := make([]*cid.Cid, aBranchLen) + aKeys := make([]cid.Cid, aBranchLen) for i := 0; i < aBranchLen; i++ { a, _ := randNode() if i >= 1 { diff --git a/pin/set.go b/pin/set.go index f0853d53a52..9d76177c766 100644 --- a/pin/set.go +++ b/pin/set.go @@ -10,10 +10,10 @@ import ( "sort" "github.com/ipfs/go-ipfs/pin/internal/pb" - "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" + "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" "gx/ipfs/QmdxUuburamoF6zF9qjeQC4WYcWGbWuRmdLacMEsW8ioD8/gogo-protobuf/proto" ) @@ -25,7 +25,7 @@ const ( maxItems = 8192 ) -func hash(seed uint32, c *cid.Cid) uint32 { +func hash(seed uint32, c cid.Cid) uint32 { var buf [4]byte binary.LittleEndian.PutUint32(buf[:], seed) h := fnv.New32a() @@ -34,9 +34,9 @@ func hash(seed uint32, c *cid.Cid) uint32 { return h.Sum32() } -type itemIterator func() (c *cid.Cid, ok bool) +type itemIterator func() (c cid.Cid, ok bool) -type keyObserver func(*cid.Cid) +type keyObserver func(cid.Cid) type sortByHash struct { links []*ipld.Link @@ -97,7 +97,7 @@ func storeItems(ctx context.Context, dag ipld.DAGService, estimatedLen uint64, d sort.Stable(s) } - hashed := make([][]*cid.Cid, defaultFanout) + hashed := make([][]cid.Cid, defaultFanout) for { // This loop essentially enumerates every single item in the set // and maps them all into a set of buckets. Each bucket will be recursively @@ -238,7 +238,7 @@ func walkItems(ctx context.Context, dag ipld.DAGService, n *merkledag.ProtoNode, return nil } -func loadSet(ctx context.Context, dag ipld.DAGService, root *merkledag.ProtoNode, name string, internalKeys keyObserver) ([]*cid.Cid, error) { +func loadSet(ctx context.Context, dag ipld.DAGService, root *merkledag.ProtoNode, name string, internalKeys keyObserver) ([]cid.Cid, error) { l, err := root.GetNodeLink(name) if err != nil { return nil, err @@ -257,7 +257,7 @@ func loadSet(ctx context.Context, dag ipld.DAGService, root *merkledag.ProtoNode return nil, merkledag.ErrNotProtobuf } - var res []*cid.Cid + var res []cid.Cid walk := func(idx int, link *ipld.Link) error { res = append(res, link.Cid) return nil @@ -269,10 +269,10 @@ func loadSet(ctx context.Context, dag ipld.DAGService, root *merkledag.ProtoNode return res, nil } -func getCidListIterator(cids []*cid.Cid) itemIterator { - return func() (c *cid.Cid, ok bool) { +func getCidListIterator(cids []cid.Cid) itemIterator { + return func() (c cid.Cid, ok bool) { if len(cids) == 0 { - return nil, false + return cid.Cid{}, false } first := cids[0] @@ -281,7 +281,7 @@ func getCidListIterator(cids []*cid.Cid) itemIterator { } } -func storeSet(ctx context.Context, dag ipld.DAGService, cids []*cid.Cid, internalKeys keyObserver) (*merkledag.ProtoNode, error) { +func storeSet(ctx context.Context, dag ipld.DAGService, cids []cid.Cid, internalKeys keyObserver) (*merkledag.ProtoNode, error) { iter := getCidListIterator(cids) n, err := storeItems(ctx, dag, uint64(len(cids)), 0, iter, internalKeys) diff --git a/pin/set_test.go b/pin/set_test.go index e98025ed192..e9aacf6aa57 100644 --- a/pin/set_test.go +++ b/pin/set_test.go @@ -5,17 +5,17 @@ import ( "encoding/binary" "testing" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - bserv "gx/ipfs/QmQLG22wSEStiociTSKQpZAuuaaWoF1B3iKyjPFvWiTQ77/go-blockservice" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" + bserv "gx/ipfs/Qma2KhbQarYTkmSJAeaMGRAg8HAXAhEWK8ge4SReG7ZSD3/go-blockservice" - offline "gx/ipfs/QmPuLWvxK1vg6ckKUpT53Dow9VLCcQGdL5Trwxa8PTLp7r/go-ipfs-exchange-offline" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" ds "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore" dsq "gx/ipfs/QmSpg1CvpXQQow5ernt1gNBXaXV6yxyNqi7XoeerWfzB5w/go-datastore/query" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - blockstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + offline "gx/ipfs/QmcRC35JF2pJQneAxa5LdQBQRumWggccWErogSrCkS1h8T/go-ipfs-exchange-offline" + blockstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) -func ignoreCids(_ *cid.Cid) {} +func ignoreCids(_ cid.Cid) {} func objCount(d ds.Datastore) int { q := dsq.Query{KeysOnly: true} @@ -46,7 +46,7 @@ func TestSet(t *testing.T) { // an infinite recursion and crash (OOM) limit := uint32((defaultFanout * maxItems) + 1) - var inputs []*cid.Cid + var inputs []cid.Cid buf := make([]byte, 4) for i := uint32(0); i < limit; i++ { binary.BigEndian.PutUint32(buf, i) diff --git a/plugin/ipld.go b/plugin/ipld.go index 01148cd3722..a8e13b26163 100644 --- a/plugin/ipld.go +++ b/plugin/ipld.go @@ -3,7 +3,7 @@ package plugin import ( "github.com/ipfs/go-ipfs/core/coredag" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // PluginIPLD is an interface that can be implemented to add handlers for diff --git a/plugin/loader/initializer.go b/plugin/loader/initializer.go index 02ad92730ca..10e0fc11258 100644 --- a/plugin/loader/initializer.go +++ b/plugin/loader/initializer.go @@ -5,7 +5,7 @@ import ( "github.com/ipfs/go-ipfs/plugin" "gx/ipfs/QmWLWmRVSiagqP15jczsGME1qpob6HDbtbHAY2he9W5iUo/opentracing-go" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) func initialize(plugins []plugin.Plugin) error { diff --git a/plugin/plugins/git/git.go b/plugin/plugins/git/git.go index 91e94e2d9d0..033a4c414fa 100644 --- a/plugin/plugins/git/git.go +++ b/plugin/plugins/git/git.go @@ -9,10 +9,10 @@ import ( "github.com/ipfs/go-ipfs/core/coredag" "github.com/ipfs/go-ipfs/plugin" + "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - git "gx/ipfs/QmTH9uimkEFHc7HcrFSG2pMskWLSfnRb8HKUngiP7r4iDN/go-ipld-git" - "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" + git "gx/ipfs/QmRNxeMQs2eVPouLxwa4tN72yTLLgWAi1cChXqgdEz5Ko4/go-ipld-git" + "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" ) // Plugins is exported list of plugins that will be loaded diff --git a/tar/format.go b/tar/format.go index 90e8414810e..294ac3e155c 100644 --- a/tar/format.go +++ b/tar/format.go @@ -9,14 +9,14 @@ import ( "strings" "github.com/ipfs/go-ipfs/dagutils" - path "gx/ipfs/QmNgXoHgXU1HzNb2HEZmRww9fDKE9NfDsvQwWLHiKHpvKM/go-path" - dag "gx/ipfs/QmNr4E8z9bGTztvHJktp7uQaMdx9p3r9Asrq6eYk7iCh4a/go-merkledag" - importer "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/importer" - uio "gx/ipfs/QmWAfTyD6KEBm7bzqNRBPvqKrZCDtn5PGbs9V1DKfnVK59/go-unixfs/io" + importer "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/importer" + uio "gx/ipfs/QmPL8bYtbACcSFFiSr4s2du7Na382NxRADR8hC7D9FkEA2/go-unixfs/io" + path "gx/ipfs/QmX7uSbkNz76yNwBhuwYwRbhihLnJqM73VTCjS3UMJud9A/go-path" + dag "gx/ipfs/QmXv5mwmQ74r4aiHcNeQ4GAmfB3aWJuqaE4WyDfDfvkgLM/go-merkledag" logging "gx/ipfs/QmRREK2CAZ5Re2Bd9zZFG6FeYDppUWt5cMgsoUEp3ktgSr/go-log" - ipld "gx/ipfs/QmX5CsuHyVZeTLxgRSYkgLSDQKb9UjE8xnhQzCEJWWWFsC/go-ipld-format" - chunker "gx/ipfs/QmXzBbJo2sLf3uwjNTeoWYiJV7CjAhkiA4twtLvwJSSNdK/go-ipfs-chunker" + ipld "gx/ipfs/QmdDXJs4axxefSPgK6Y1QhpJWKuDPnGJiqgq4uncb4rFHL/go-ipld-format" + chunker "gx/ipfs/QmdSeG9s4EQ9TGruJJS9Us38TQDZtMmFGwzTYUDVqNTURm/go-ipfs-chunker" ) var log = logging.Logger("tarfmt") diff --git a/test/integration/bitswap_wo_routing_test.go b/test/integration/bitswap_wo_routing_test.go index ff6dc7f64f1..34474a66d88 100644 --- a/test/integration/bitswap_wo_routing_test.go +++ b/test/integration/bitswap_wo_routing_test.go @@ -7,10 +7,10 @@ import ( "github.com/ipfs/go-ipfs/core" "github.com/ipfs/go-ipfs/core/mock" - "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" + "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mocknet "gx/ipfs/QmUEqyXr97aUbNmQADHYNknjwjjdVpJXEt1UZXmSG81EV4/go-libp2p/p2p/net/mock" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" ) func TestBitswapWithoutRouting(t *testing.T) { diff --git a/test/sharness/t0275-cid-security.sh b/test/sharness/t0275-cid-security.sh index 3da56261b14..7c4c2f57e64 100755 --- a/test/sharness/t0275-cid-security.sh +++ b/test/sharness/t0275-cid-security.sh @@ -19,7 +19,7 @@ test_expect_success "error reason is pointed out" ' ' test_expect_success "adding using too short of a hash function gives out an error" ' - echo foo | test_must_fail ipfs block put --mhlen 19 2>block_out + echo foo | test_must_fail ipfs block put -f protobuf --mhlen 19 2>block_out ' test_expect_success "error reason is pointed out" ' diff --git a/thirdparty/cidv0v1/blockstore.go b/thirdparty/cidv0v1/blockstore.go index 3caca0b9e2c..3f0f968cf0a 100644 --- a/thirdparty/cidv0v1/blockstore.go +++ b/thirdparty/cidv0v1/blockstore.go @@ -1,10 +1,10 @@ package cidv0v1 import ( + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" mh "gx/ipfs/QmPnFwZ2JXKnXgMw8CdBPxn7FWh6LLdjUjxV1fKHuJnkr8/go-multihash" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bs "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + bs "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) type blockstore struct { @@ -15,19 +15,19 @@ func NewBlockstore(b bs.Blockstore) bs.Blockstore { return &blockstore{b} } -func (b *blockstore) Has(c *cid.Cid) (bool, error) { +func (b *blockstore) Has(c cid.Cid) (bool, error) { have, err := b.Blockstore.Has(c) if have || err != nil { return have, err } c1 := tryOtherCidVersion(c) - if c1 == nil { + if !c1.Defined() { return false, nil } return b.Blockstore.Has(c1) } -func (b *blockstore) Get(c *cid.Cid) (blocks.Block, error) { +func (b *blockstore) Get(c cid.Cid) (blocks.Block, error) { block, err := b.Blockstore.Get(c) if err == nil { return block, nil @@ -36,7 +36,7 @@ func (b *blockstore) Get(c *cid.Cid) (blocks.Block, error) { return nil, err } c1 := tryOtherCidVersion(c) - if c1 == nil { + if !c1.Defined() { return nil, bs.ErrNotFound } block, err = b.Blockstore.Get(c1) @@ -57,7 +57,7 @@ func (b *blockstore) Get(c *cid.Cid) (blocks.Block, error) { return block, nil } -func (b *blockstore) GetSize(c *cid.Cid) (int, error) { +func (b *blockstore) GetSize(c cid.Cid) (int, error) { size, err := b.Blockstore.GetSize(c) if err == nil { return size, nil @@ -66,18 +66,18 @@ func (b *blockstore) GetSize(c *cid.Cid) (int, error) { return -1, err } c1 := tryOtherCidVersion(c) - if c1 == nil { + if !c1.Defined() { return -1, bs.ErrNotFound } return b.Blockstore.GetSize(c1) } -func tryOtherCidVersion(c *cid.Cid) *cid.Cid { +func tryOtherCidVersion(c cid.Cid) cid.Cid { prefix := c.Prefix() if prefix.Codec != cid.DagProtobuf || prefix.MhType != mh.SHA2_256 || prefix.MhLength != 32 { - return nil + return cid.Undef } - var c1 *cid.Cid + var c1 cid.Cid if prefix.Version == 0 { c1 = cid.NewCidV1(cid.DagProtobuf, c.Hash()) } else { diff --git a/thirdparty/verifbs/verifbs.go b/thirdparty/verifbs/verifbs.go index 07f1607a838..fd09028ae2b 100644 --- a/thirdparty/verifbs/verifbs.go +++ b/thirdparty/verifbs/verifbs.go @@ -1,10 +1,10 @@ package verifbs import ( - "gx/ipfs/QmVUhfewLZpSaAiBYCpw2krYMaiVmFuhr2iurQLuRoU6sD/go-verifcid" - blocks "gx/ipfs/QmWAzSEoqZ6xU6pu8yL8e5WaMb7wtbfbhhN4p1DknUPtr3/go-block-format" - cid "gx/ipfs/QmZFbDTY9jfSBms2MchvYM9oYRbAF19K7Pby47yDBfpPrb/go-cid" - bstore "gx/ipfs/Qmeg56ecxRnVv7VWViMrDeEMoBHaNFMs4vQnyQrJ79Zz7i/go-ipfs-blockstore" + cid "gx/ipfs/QmPSQnBKM9g7BaUcZCvswUJVscQ1ipjmwxN5PXCjkp9EQ7/go-cid" + blocks "gx/ipfs/QmRcHuYzAyswytBuMF78rj3LTChYszomRFXNg4685ZN1WM/go-block-format" + "gx/ipfs/QmVkMRSkXrpjqrroEXWuYBvDBnXCdMMY6gsKicBGVGUqKT/go-verifcid" + bstore "gx/ipfs/QmegPGspn3RpTMQ23Fd3GVVMopo1zsEMurudbFMZ5UXBLH/go-ipfs-blockstore" ) type VerifBSGC struct { @@ -27,7 +27,7 @@ func (bs *VerifBSGC) PutMany(blks []blocks.Block) error { return bs.GCBlockstore.PutMany(blks) } -func (bs *VerifBSGC) Get(c *cid.Cid) (blocks.Block, error) { +func (bs *VerifBSGC) Get(c cid.Cid) (blocks.Block, error) { if err := verifcid.ValidateCid(c); err != nil { return nil, err } @@ -54,7 +54,7 @@ func (bs *VerifBS) PutMany(blks []blocks.Block) error { return bs.Blockstore.PutMany(blks) } -func (bs *VerifBS) Get(c *cid.Cid) (blocks.Block, error) { +func (bs *VerifBS) Get(c cid.Cid) (blocks.Block, error) { if err := verifcid.ValidateCid(c); err != nil { return nil, err }