Brian Tiger Chow
5cec6197ae
test(exch:bs:strategy) test accounting consistency
...
> Why expose num bytes sent and received?
Makes it easy to test consistency of the ledgers
> Got a better reason?
Makes it possible to expose metrics to the people-facing API
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
ded1f8f5a8
fix(bitswap) compiler errors
...
didn't run tests after the refactor. apologies.
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
e1fe4f6d60
refac(exchange) rename exchange.Interface to match golang conventions
...
examples:
http://golang.org/pkg/container/heap/#Interface
http://golang.org/pkg/net/#Interface
http://golang.org/pkg/sort/#Interface
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
fd086b9c48
refac(exchange) bitswap -> exchange/bitswap
...
Move go-ipfs/bitswap package to go-ipfs/exchange/bitswap
* Delineates the difference between the generic exchange interface and
implementations (eg. BitSwap protocol)
Thus, the bitswap protocol can be refined without having to overthink
how future exchanges will work. Aspects common to BitSwap and other
exchanges can be extracted out to the exchange package in piecemeal.
Future exchange implementations can be placed in sibling packages next
to exchange/bitswap. (eg. exchange/multilateral)
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
79705729f8
style(bitswap) remove unnecessary interface
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
de9fcf5d12
style(bitswap) rename strategist -> strategy
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
b780694757
fix(bitswap) init wantlist
...
+ test that a partners wants are remembered by message receiver
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
be8e08675d
fix(bitswap) implement, test concrete strategist
2014-09-22 04:06:13 -07:00
Juan Batiz-Benet
043c09e14b
fixed get/put
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
9dd39de491
Fixed connections all over.
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
f7634611e6
secured net logs
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
1439a53b15
handshake: bugfix (secure -> insecure chan) + logs
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
f41817c8d3
use Alpha as the concurrency.
...
cc @whyrusleeping
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
de7af506b1
dht.Connect(Peer)
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
569268c676
peer.DecodePrettyID
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
d040104762
handshake: setting remote key expects it to match
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
4284e8e960
config: use PeerID in bootstrap config
2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
9ea715cb10
comment out dht_test for now.
2014-09-22 04:06:10 -07:00
Juan Batiz-Benet
313f3c83c8
muxer construction
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
700b6ab99f
remove start
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
7a785ded74
sync counter for processing things
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
25d0ce8fdd
NoResponse service
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
69b1ce42d9
nil muxer
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
dc0fbfd3d3
added some logging
2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
a114e9cd12
better query processing (runner)
2014-09-22 04:05:22 -07:00
Juan Batiz-Benet
98c3afeecf
clean up channel use
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
b77a785cd8
fix(dht) remove deprecated Start() call
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
20802018a6
feat(bit swap) stub out a concrete strategist
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
22539cf6d0
fix(bitswap:strategy) move key set
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
b8133a4853
refac(bit swap) move ledger to strategy package
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
2d6e422f4a
style(bitswap) sort in c'tor
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
36ce8a280b
chore(bitswap) rm halt chan since bitswap has no daemon
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
2dc8bc8381
chore(bitswap) rm vestigial fields
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
b8fcc137a6
refac(bitswap) inline helper methods
...
for readability
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
4448494155
feat(bitswap:strategy) add interfaces
...
refac(bitswap:strategy) update interface
2014-09-22 04:05:22 -07:00
Brian Tiger Chow
cff3a86622
refac(bitswap) privatize send block
2014-09-22 04:05:21 -07:00
Brian Tiger Chow
830883722d
chore(bitswap) remove dead/unused wantlist code
2014-09-22 04:05:21 -07:00
Brian Tiger Chow
547f9e1cf6
fix(core) patiently convince the core to compile
...
=)
2014-09-22 04:05:21 -07:00
Brian Tiger Chow
56e6c453a2
fix(routing/dht) match the routing interface
...
the channel's "spin" is specified in the interface now =)
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
29322a24da
tests compile
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
67bd041b9c
got everything to build
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
551c40930e
chan queue
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
ae1f7688aa
separate to ensure sync safety
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
9e2c3fb8fc
expose Len on PQ
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
51eeec1a79
sync safety to pq
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
a21c1b6b62
PeerQueue (based on XOR distance metric)
2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
e62b822277
refactored keyspace Adjusted -> Bytes
2014-09-22 04:05:20 -07:00
Juan Batiz-Benet
6c00938e78
kbucket use new keyspace
2014-09-22 04:05:20 -07:00
Juan Batiz-Benet
ac9745bc4c
moved keyspace
2014-09-22 04:05:20 -07:00
Juan Batiz-Benet
ab04137853
SortByDistance copy fix
2014-09-22 04:05:20 -07:00