Unverified 提交 27c0de7f 作者: Steven Allen 提交者: GitHub

Merge pull request #6597 from ipfs/dep/update-swarm

dep: update deps
...@@ -8,7 +8,6 @@ import ( ...@@ -8,7 +8,6 @@ import (
"github.com/ipfs/go-ipfs/pin" "github.com/ipfs/go-ipfs/pin"
cid "github.com/ipfs/go-cid" cid "github.com/ipfs/go-cid"
ds "github.com/ipfs/go-datastore"
bs "github.com/ipfs/go-ipfs-blockstore" bs "github.com/ipfs/go-ipfs-blockstore"
) )
...@@ -47,10 +46,20 @@ func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []cid.Cid, opts RmBl ...@@ -47,10 +46,20 @@ func RmBlocks(blocks bs.GCBlockstore, pins pin.Pinner, cids []cid.Cid, opts RmBl
stillOkay := FilterPinned(pins, out, cids) stillOkay := FilterPinned(pins, out, cids)
for _, c := range stillOkay { for _, c := range stillOkay {
err := blocks.DeleteBlock(c) // Kept for backwards compatibility. We may want to
if err != nil && opts.Force && (err == bs.ErrNotFound || err == ds.ErrNotFound) { // remove this sometime in the future.
// ignore non-existent blocks has, err := blocks.Has(c)
} else if err != nil { if err != nil {
out <- &RemovedBlock{Hash: c.String(), Error: err.Error()}
continue
}
if !has && !opts.Force {
out <- &RemovedBlock{Hash: c.String(), Error: bs.ErrNotFound.Error()}
continue
}
err = blocks.DeleteBlock(c)
if err != nil {
out <- &RemovedBlock{Hash: c.String(), Error: err.Error()} out <- &RemovedBlock{Hash: c.String(), Error: err.Error()}
} else if !opts.Quiet { } else if !opts.Quiet {
out <- &RemovedBlock{Hash: c.String()} out <- &RemovedBlock{Hash: c.String()}
......
...@@ -2,6 +2,7 @@ module github.com/ipfs/go-ipfs ...@@ -2,6 +2,7 @@ module github.com/ipfs/go-ipfs
require ( require (
bazil.org/fuse v0.0.0-20180421153158-65cc252bf669 bazil.org/fuse v0.0.0-20180421153158-65cc252bf669
github.com/AndreasBriese/bbloom v0.0.0-20190823232136-616930265c33 // indirect
github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd github.com/Kubuxu/gocovmerge v0.0.0-20161216165753-7ecaa51963cd
github.com/blang/semver v3.5.1+incompatible github.com/blang/semver v3.5.1+incompatible
github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d github.com/bren2010/proquint v0.0.0-20160323162903-38337c27106d
...@@ -19,15 +20,15 @@ require ( ...@@ -19,15 +20,15 @@ require (
github.com/ipfs/go-blockservice v0.1.0 github.com/ipfs/go-blockservice v0.1.0
github.com/ipfs/go-cid v0.0.3 github.com/ipfs/go-cid v0.0.3
github.com/ipfs/go-cidutil v0.0.2 github.com/ipfs/go-cidutil v0.0.2
github.com/ipfs/go-datastore v0.0.5 github.com/ipfs/go-datastore v0.1.0
github.com/ipfs/go-detect-race v0.0.1 github.com/ipfs/go-detect-race v0.0.1
github.com/ipfs/go-ds-badger v0.0.5 github.com/ipfs/go-ds-badger v0.0.5
github.com/ipfs/go-ds-flatfs v0.0.2 github.com/ipfs/go-ds-flatfs v0.1.0
github.com/ipfs/go-ds-leveldb v0.0.2 github.com/ipfs/go-ds-leveldb v0.1.0
github.com/ipfs/go-ds-measure v0.0.1 github.com/ipfs/go-ds-measure v0.0.1
github.com/ipfs/go-filestore v0.0.2 github.com/ipfs/go-filestore v0.0.2
github.com/ipfs/go-fs-lock v0.0.1 github.com/ipfs/go-fs-lock v0.0.1
github.com/ipfs/go-ipfs-blockstore v0.0.3 github.com/ipfs/go-ipfs-blockstore v0.1.0
github.com/ipfs/go-ipfs-chunker v0.0.1 github.com/ipfs/go-ipfs-chunker v0.0.1
github.com/ipfs/go-ipfs-cmds v0.1.0 github.com/ipfs/go-ipfs-cmds v0.1.0
github.com/ipfs/go-ipfs-config v0.0.6 github.com/ipfs/go-ipfs-config v0.0.6
...@@ -79,7 +80,7 @@ require ( ...@@ -79,7 +80,7 @@ require (
github.com/libp2p/go-libp2p-record v0.1.1 github.com/libp2p/go-libp2p-record v0.1.1
github.com/libp2p/go-libp2p-routing-helpers v0.1.0 github.com/libp2p/go-libp2p-routing-helpers v0.1.0
github.com/libp2p/go-libp2p-secio v0.2.0 github.com/libp2p/go-libp2p-secio v0.2.0
github.com/libp2p/go-libp2p-swarm v0.2.0 github.com/libp2p/go-libp2p-swarm v0.2.1
github.com/libp2p/go-libp2p-testing v0.1.0 github.com/libp2p/go-libp2p-testing v0.1.0
github.com/libp2p/go-libp2p-tls v0.1.0 github.com/libp2p/go-libp2p-tls v0.1.0
github.com/libp2p/go-libp2p-yamux v0.2.1 github.com/libp2p/go-libp2p-yamux v0.2.1
...@@ -99,6 +100,7 @@ require ( ...@@ -99,6 +100,7 @@ require (
github.com/syndtr/goleveldb v1.0.0 github.com/syndtr/goleveldb v1.0.0
github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc github.com/whyrusleeping/base32 v0.0.0-20170828182744-c30ac30633cc
github.com/whyrusleeping/go-sysinfo v0.0.0-20190219211824-4a357d4b90b1 github.com/whyrusleeping/go-sysinfo v0.0.0-20190219211824-4a357d4b90b1
github.com/whyrusleeping/mdns v0.0.0-20190823211037-23958d6311f0 // indirect
github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7 github.com/whyrusleeping/multiaddr-filter v0.0.0-20160516205228-e903e4adabd7
github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c github.com/whyrusleeping/tar-utils v0.0.0-20180509141711-8c6c8ba81d5c
go.uber.org/atomic v1.4.0 // indirect go.uber.org/atomic v1.4.0 // indirect
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论