ipfs-cluster/api
Hector Sanjuan d1700dbe81 Fixes #1319: Status wrongly shows pins as REMOTE
The Allocations of a pin that has been added with default replication factor
are kept even when the replication factor turns out to be -1.

This resulted in the Status(cid) code skipping calls to a number of peers
and setting the pin directly as REMOTE.

The fix, on one side makes sure Allocations is always nil when the replication
factor is -1. On the other size, lets the globalPinInfoCid method check the
replication factor value, rather than the number of allocations to decide if
any nodes are bound to be remote.

On the plus side, the pin tracker used the IsRemotePin method, which uses the
replication factor, so things were pinned even if the Status(cid) method shows
them as remote.
2021-03-24 00:47:15 +01:00
..
ipfsproxy ipfsproxy: fix 'undefined cid' string appeareance in progress output 2021-01-13 16:32:08 +01:00
pb Remove unexistent linter directive 2021-01-13 20:59:16 +01:00
rest Restapi: API libp2p host and client should no longer use secio. (#1316) 2021-02-24 16:10:44 +01:00
add_test.go Fix #481: Pin expiration 2019-11-05 10:40:48 +01:00
add.go Fix #1009: Add Mode={direct,recursive} PinOption 2020-04-21 17:23:55 +02:00
types_test.go gofmt -s fixes 2020-04-14 23:44:18 +02:00
types.go Fixes #1319: Status wrongly shows pins as REMOTE 2021-03-24 00:47:15 +01:00
util.go staticcheck: fix all staticcheck warnings in the project 2020-04-14 20:16:10 +02:00