131 Commits

Author SHA1 Message Date
Juan Batiz-Benet
fb367a8619 dht: changed msgs, include multiple addrs + conn type
See https://github.com/jbenet/go-ipfs/issues/153#issuecomment-63350535
2014-12-08 20:52:34 -08:00
Brian Tiger Chow
add43e52a4 fix(dht/routing) make GetProviders respect context
This commit makes GetProviders (sync) respect the request context. It
also amends all of GetProviders' callsites to pass a context in. This
meant changing the signature of the dht's handlerfunc.

I think I'll start referring to the request context as Vito Corleone.

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
Jeromy
cd4baf2245 make vendor 2014-11-16 02:45:19 -08:00
Jeromy
1e7e59f0c4 fix validators and key prefix 2014-11-16 02:45:19 -08:00
Jeromy
cac56033a9 switch DHT entries over to be records, test currently fail 2014-11-16 02:45:19 -08:00
Jeromy
6d4ac99351 more doc comments 2014-11-08 22:44:37 -08:00
Juan Batiz-Benet
be52e35ed7 dht ctxcloserify 2014-10-25 21:33:59 -07:00
Jeromy
1c9b21063d lots of logging 2014-10-26 00:45:40 +00:00
Brian Tiger Chow
1024504a6f refactor(dht/pb) move proto to pb package 2014-10-25 04:13:28 -07:00
Juan Batiz-Benet
2aeefaa102 go-vet friendly codebase
- distinguish log.Error and log.Errorf functions
- Initialize structs with field names
- A bit of unreachable code (defers)
2014-10-25 03:46:39 -07:00
Juan Batiz-Benet
840a868c6f notes 2014-10-22 03:24:05 -07:00
Jeromy
9f4bdde9b8 working on debugging dht issues 2014-10-22 03:24:05 -07:00
Juan Batiz-Benet
3b15457cf0 renamed datastore.go -> go-datastore 2014-10-21 15:10:58 -07:00
Juan Batiz-Benet
28e083b902 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Jeromy
9dbba5c6d0 some dht cleanup, and make DHTs take a master context 2014-10-18 04:28:26 -07:00
Jeromy
34452f1678 fix bug in diagnostics, and add more peers to closer peer responses 2014-10-18 04:28:25 -07:00
Juan Batiz-Benet
4429ee65e3 logging + tweaks 2014-10-18 04:28:24 -07:00
Juan Batiz-Benet
5fe1399bab dht handleAddProviders adds addr in msg
Otherwise don't have the peer's target address.
2014-10-18 04:28:24 -07:00
Jeromy
52fca5a91e add in some extra debug logging, and increase routing table latencies 2014-10-08 21:55:50 +00:00
Juan Batiz-Benet
740b381804 changed logging, in dht and elsewhere
- use log.* instead of u.*
- use automatic type conversions to .String()
  (Peer.String() prints nicely, and avoids calling b58 encoding
  until needed)
2014-10-07 21:33:59 -07:00
Juan Batiz-Benet
129ac6aaa6 use string datastore keys. 2014-10-03 15:39:22 -07:00
Juan Batiz-Benet
00659cbb7e 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
Juan Batiz-Benet
0a9810a150 dht tests pass again 2014-09-22 04:06:16 -07:00
Juan Batiz-Benet
34e171e2b3 fixed get/put 2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
709f932e6e Fixed connections all over. 2014-09-22 04:06:12 -07:00
Juan Batiz-Benet
45796e5fdf remove start 2014-09-22 04:05:23 -07:00
Juan Batiz-Benet
b5f0a42bd6 better query processing (runner) 2014-09-22 04:05:22 -07:00
Juan Batiz-Benet
fdea4d9c5f got everything to build 2014-09-22 04:05:21 -07:00
Juan Batiz-Benet
fa2b736bbe newMessage and more impl. 2014-09-22 04:05:19 -07:00
Juan Batiz-Benet
4366f4a031 uncomment all handlers 2014-09-22 04:05:18 -07:00
Juan Batiz-Benet
6ed2d45182 moved handlers to own file 2014-09-22 04:05:17 -07:00