Commit Graph

130 Commits

Author SHA1 Message Date
Jeromy
a65e8600a3 catch ipns branch up to master and make all things compile 2014-10-01 00:37:53 -07:00
Jeromy
2aa2b8c6c7 add routing resolver test 2014-10-01 00:26:59 -07:00
Jeromy
8ddfb57c59 some bugfixes and added logging 2014-10-01 00:26:59 -07:00
Jeromy
b5fd9492d7 fixes to make interface more usable 2014-10-01 00:25:52 -07:00
Jeromy
727b6bf9a3 udpated commands and RPC dialing to work with new configuration changes 2014-09-27 16:02:50 -07:00
Juan Batiz-Benet
53f0b117f5 update net with peerstore 2014-09-26 02:41:46 -07:00
Brian Tiger Chow
e2a9c5de00 feat(net:service, routing) remove error return value 2014-09-24 23:35:36 -04:00
Jeromy
c044d9c32e move mock routing tests to proper directory 2014-09-23 18:23:46 -04:00
Jeromy
414ff34194 change back to using Client method 2014-09-23 18:23:46 -04:00
Jeromy
c45cc8c448 implement a mock dht for use in testing 2014-09-23 18:23:46 -04:00
Juan Batiz-Benet
10a1a01cf7 ping: return sme msg
This fixes the broken pinging. (the issue was the cluster
level, it's bein set incorrectly (off by one))

Anyway, this works now:

    [peer: QmfQTbC3LxfpK5WoyHW2WgnAzo6d6GePuq2wHTsJNXM5PS] Sent message type: 'PING' [to = QmNXUeFrV9gxR4aqJddEsfhWZLSJrUsfpUSeRb3R7xvSp9]
    [QmfQTbC3LxfpK5WoyHW2WgnAzo6d6GePuq2wHTsJNXM5PS] ping QmNXUeFrV9gxR4aqJddEsfhWZLSJrUsfpUSeRb3R7xvSp9 end (err = %!s(<nil>))

cc @whyrusleeping
2014-09-23 05:23:54 -07:00
Jeromy
7228786981 make a few tests perform operations in two directions instead of one 2014-09-22 22:34:30 -07:00
Jeromy
7bc4fbfa5d turn logging on by default, also make Provide not fail when no peers connected 2014-09-22 19:22:04 -07:00
Juan Batiz-Benet
adcf0bfe70 better logging for ping 2014-09-22 15:53:37 -07:00
Brian Tiger Chow
197046c9d2 fix(routing:dht) add ctx args 2014-09-22 04:06:19 -07:00
Brian Tiger Chow
d514b91ff3 fix(routing:dht) implement FindProvidersAsync in terms of FindProviders
until construction is complete on the actual async method

reverts changes from ec50703395098f75946f0bad01816cc54ab18a58

ec50703395
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
52cefb16cd Routing uses context now
@perfmode boom
2014-09-22 04:06:18 -07:00
Juan Batiz-Benet
aa29603923 dht tests pass again 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
afb1d01048 provider testing 2014-09-22 04:06:15 -07:00
Brian Tiger Chow
0bd8f2092b refac(routing) replace timeout -> ctx
@jbenet oh hai there!
2014-09-22 04:06:14 -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
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
9ea715cb10 comment out dht_test for now. 2014-09-22 04:06:10 -07:00
Juan Batiz-Benet
700b6ab99f remove start 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
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
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
Juan Batiz-Benet
b838cc0619 cleaner KeySpace abstraction. 2014-09-22 04:05:20 -07:00
Juan Batiz-Benet
15a823d058 newMessage and more impl. 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
0773e584fd updated Update function 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
3ae7021700 getFromPeerList and peerFromInfo 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
e4e021085b add Peerstore to dht 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
34a0580ea6 godep multiaddr update 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
4cc1f60d91 Peerstore -- threadsafe collection
this will later have persistent storage, but no need yet
2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
3711d54098 getValueSingle using SendRequest 2014-09-22 04:05:18 -07:00
Juan Batiz-Benet
520640840f check type assertion
`v.([]byte)` coming from a datastore can panic.
`byt, ok := v.([]byte)` to be safe.

@whyrusleeping
2014-09-22 04:05:18 -07:00
Juan Batiz-Benet
0fca9868ae uncomment all handlers 2014-09-22 04:05:18 -07:00
Juan Batiz-Benet
d91955b412 moved handlers to own file 2014-09-22 04:05:17 -07:00
Juan Batiz-Benet
c4536d127d comment out diagnostic
it'll have to change lots since the listener is gone
2014-09-22 04:05:17 -07:00
Juan Batiz-Benet
69ed45c555 refactor peer distance search + handleGetProviders 2014-09-22 04:05:17 -07:00
Juan Batiz-Benet
9eb41e7237 ping + find peer 2014-09-22 04:05:17 -07:00
Juan Batiz-Benet
2522625bc6 lint nit 2014-09-22 04:05:17 -07:00