diff --git a/.travis.yml b/.travis.yml index 4cfe98c2424d60b3a50d870dc0da5df2ee9243ba..5163d693fc757ec0c13d134e9d4cabd6cc7c85d7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ env: global: - GOTFLAGS="-race" matrix: - - BUILD_DEPTYPE=gx - BUILD_DEPTYPE=gomod @@ -24,7 +23,6 @@ script: cache: directories: - - $GOPATH/src/gx - $GOPATH/pkg/mod - $HOME/.cache/go-build diff --git a/Makefile b/Makefile deleted file mode 100644 index 73f2841f618b54e03cb34a9c91c8a0596a829c31..0000000000000000000000000000000000000000 --- a/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -all: deps -gx: - go get github.com/whyrusleeping/gx - go get github.com/whyrusleeping/gx-go -deps: gx - gx --verbose install --global - gx-go rewrite -test: deps - gx test -v -race -coverprofile=coverage.txt -covermode=atomic . -rw: - gx-go rewrite -rwundo: - gx-go rewrite --undo -publish: rwundo - gx publish -.PHONY: all gx deps test rw rwundo publish - - diff --git a/arc_cache.go b/arc_cache.go index 231fd8555aba17bd5bff99b275418b4da728c72c..ca491e5325cf5671b8a3939abe5dd30cd51c1ecb 100644 --- a/arc_cache.go +++ b/arc_cache.go @@ -16,7 +16,7 @@ type cacheSize int // block Cids. This provides block access-time improvements, allowing // to short-cut many searches without query-ing the underlying datastore. type arccache struct { - arc *lru.ARCCache + arc *lru.TwoQueueCache blockstore Blockstore hits metrics.Counter @@ -24,7 +24,7 @@ type arccache struct { } func newARCCachedBS(ctx context.Context, bs Blockstore, lruSize int) (*arccache, error) { - arc, err := lru.NewARC(lruSize) + arc, err := lru.New2Q(lruSize) if err != nil { return nil, err } diff --git a/bloom_cache.go b/bloom_cache.go index 3720d20d89e69d0264dbea23b77100f15e60ffd3..f99bb2b4bedd288a813acf81508bd7a0c1c95d99 100644 --- a/bloom_cache.go +++ b/bloom_cache.go @@ -148,7 +148,7 @@ func (b *bloomcache) Has(k cid.Cid) (bool, error) { } func (b *bloomcache) GetSize(k cid.Cid) (int, error) { - return b.blockstore.GetSize(k) + return b.blockstore.GetSize(k) } func (b *bloomcache) Get(k cid.Cid) (blocks.Block, error) { diff --git a/package.json b/package.json deleted file mode 100644 index 6a40ca76d9d4aea66a93ea124b8c65508f6f4e37..0000000000000000000000000000000000000000 --- a/package.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "author": "hsanjuan", - "bugs": { - "url": "https://github.com/ipfs/go-ipfs-blockstore" - }, - "gx": { - "dvcsimport": "github.com/ipfs/go-ipfs-blockstore" - }, - "gxDependencies": [ - { - "author": "stebalien", - "hash": "QmYYLnAzR28nAQ4U5MFniLprnktu6eTFKibeNt96V21EZK", - "name": "go-block-format", - "version": "0.2.2" - }, - { - "author": "jbenet", - "hash": "QmUadX5EcvrBmxAV9sE7wUWtWSqxns5K84qKJBixmcT1w9", - "name": "go-datastore", - "version": "3.6.1" - }, - { - "author": "ipfs", - "hash": "QmekzFM3hPZjTjUFGTABdQkEnQ3PTiMstY198PwSFr5w1Q", - "name": "go-metrics-interface", - "version": "0.2.0" - }, - { - "author": "hashicorp", - "hash": "QmQjMHF8ptRgx4E57UFMiT4YM6kqaJeYxZ1MCDX23aw4rK", - "name": "golang-lru", - "version": "2017.10.18" - }, - { - "author": "whyrusleeping", - "hash": "QmTbxNB1NwDesLmKTscr4udL2tVP7MaxvXnD1D9yX7g3PN", - "name": "go-cid", - "version": "0.9.3" - }, - { - "author": "hector", - "hash": "QmXSEqXLCzpCByJU4wqbJ37TcBEj77FKMUWUP1qLh56847", - "name": "go-ipfs-ds-help", - "version": "0.1.7" - }, - { - "author": "kubuxu", - "hash": "QmWaLViWQF8jgyoLLqqcSrnp6dJpHESiJfzor1vrfDyTZf", - "name": "bbloom", - "version": "0.1.2" - }, - { - "hash": "QmbkT7eMTyXfpeyB3ZMxxcxg7XH8t6uXp49jqzz4HB7BGF", - "name": "go-log", - "version": "1.5.9" - } - ], - "gxVersion": "0.12.1", - "language": "go", - "license": "MIT", - "name": "go-ipfs-blockstore", - "releaseCmd": "git commit -a -m \"gx publish $VERSION\"", - "version": "0.1.8" -} -