1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-09-09 23:42:20 +08:00

15 Commits

Author SHA1 Message Date
ef294431d4 move util.Key into its own package under blocks 2015-06-01 16:10:08 -07:00
bf22aeec0a Reorged imports from jbenet/go-ipfs to ipfs/go-ipfs
- Modified Godeps/Godeps.json by hand
- [TEST] Updated welcome docs hash to sharness
- [TEST] Updated contact doc
- [TEST] disabled breaking test (t0080-repo refs local)
2015-03-31 12:52:25 -07:00
140c70d772 document some packages 2015-02-10 22:59:10 +00:00
49f2684c53 expose O(1) len 2015-01-30 06:57:41 -08:00
d61ce41516 fix(bitswap/engine): get priority from wantlist 2015-01-18 15:09:54 -08:00
0545c4d15d refactor: *Entry -> Entry
in many places, entries are assigned from one slice to another and in
different goroutines. In one place, entries were modified (in the
queue). To avoid shared mutable state, probably best to handle entries
by value.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:46 -08:00
9c301a2d77 add comment
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:45 -08:00
8d4d5b86ef fix: don't sort the output of Entries()
only sort SortedEntries()

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:45 -08:00
bef622222d refactor: wantlist splits into WL and ThreadSafe WL
bitswap keeps the threadsafe version. observing the ledger shows that it
doesn't need it anymore (ledgermanager is protected and safe).

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:44 -08:00
fedcebf67a refactor: re-use wantlist.Entry type wherever it makes sense
it seems to make sense since, in each place, the Key and Priority
represent the same information

b/c you know the saying...

"It is better to have 100 functions operate on one data structure than
10 functions on 10 data structures."

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:44 -08:00
6389bfda6b some cleanup before CR 2014-12-17 23:44:41 -08:00
946d2a96f2 add locks to wantlist to avoid race condition 2014-12-17 23:44:40 -08:00
50aa37fec4 blockstore.ErrNotFound, and proper wantlist sorting 2014-12-17 23:44:40 -08:00
57e7dd7b8b extracted ledgerset from strategy, cleaned up a few comments from the PR 2014-12-17 23:44:40 -08:00
12b296ee1a create wantlist object 2014-12-17 23:44:39 -08:00