Brian Tiger Chow
14990bb556
fix(merkledag/test) panic!
...
https://travis-ci.org/jbenet/go-ipfs/jobs/45000756
cc @whyrusleeping @jbenet
lol this is starting to happen pretty often
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
c253590770
refactor(routing/mock) move files
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
6da57c6764
feat(bitswap/testnet) impl a version of bitswap testnet that uses mockpeernet under the hood
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
85ce94c510
refactor(bitswap/testnet) rename to virtual
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
d390e31c11
refactor(bitswap/testnet) extract interface in prep for mockpeernet version
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
d5e936a2c6
ignore log output
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
6cdb4c23b4
pass peer into testnet adapter method
2014-12-24 09:31:18 -05:00
Brian Tiger Chow
e017d6edc6
refactor(bitswap/testnet) slim down interface
...
so it'll be easier to create another implementation using the new
mocknet
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
12b92f03f1
add RandPeerOrFatal test helper
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
b551e45ae9
use testutil peer in sess
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
a85aa9b5da
refactor: rename testutil func
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
81a67338f1
fix(bitswap) remove peerstore
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
b31f728188
feat(testutil) add testutil.Peer shim
2014-12-24 09:31:17 -05:00
Brian Tiger Chow
c933d439b7
misc docs and fmting
2014-12-24 09:31:17 -05:00
Juan Batiz-Benet
8d8a1dc7e1
Merge pull request #473 from jbenet/dht-test-providers
...
dht fixes
2014-12-24 06:17:12 -08:00
Juan Batiz-Benet
0938471d1c
ctxio: fix buffer of 1 so goroutine exits when io completes.
2014-12-24 05:50:05 -08:00
Juan Batiz-Benet
989d3d4ce5
dht/test skip bootstrap test when short
2014-12-24 05:39:48 -08:00
Juan Batiz-Benet
60c869d401
dht/test: providers test id compare
2014-12-24 04:23:15 -08:00
Juan Batiz-Benet
99636b571c
net/id: handle error case
2014-12-24 04:22:51 -08:00
Juan Batiz-Benet
923c082d66
dht: cleaned up dht_test.
...
TestProversMany still fails
2014-12-24 03:48:02 -08:00
Juan Batiz-Benet
57510d2fec
dht/dht_test: bootstrap synchronously. fares better.
2014-12-24 03:46:45 -08:00
Juan Batiz-Benet
618097d80e
dht/query: log when dialing a closerpeer
2014-12-24 03:45:20 -08:00
Juan Batiz-Benet
8adda0fffc
dht: bootstrap query constants
2014-12-24 03:44:03 -08:00
Juan Batiz-Benet
e630ca6078
dht: removing extra newlines
2014-12-24 03:42:43 -08:00
Juan Batiz-Benet
b5cbc8b6fa
dht_test: better bootstrapping logging
2014-12-24 03:41:13 -08:00
Juan Batiz-Benet
900c1fbfa2
net/id: when dup id, wait on it.
2014-12-24 03:38:44 -08:00
Juan Batiz-Benet
ef0c25f463
dht bootstrap test: rounds. do nothing
...
odd behavior: only one dht (the last one) is seeing
changes to its routing table.
2014-12-24 03:24:52 -08:00
Juan Batiz-Benet
ccf6f79aa0
respect don contexteone
2014-12-24 03:24:28 -08:00
Juan Batiz-Benet
f8c523fc3b
bootstrap test
2014-12-24 02:20:11 -08:00
Juan Batiz-Benet
cdb461d2a9
dht: update on every received message
...
i made a separate function because we may want to update our
routing table based on "closer peers". maybe not-- these could
all be lies.
2014-12-24 02:20:11 -08:00
Juan Batiz-Benet
61cdef3570
dht/query: fix important panic
...
Withe queries (particularly providers), it was possible to
exit the query runner's Run BEFORE all its children were done,
because the runner itself only listened to the context. This
introduced the possibility of a panic (you can go check it
out by running the TestProvidersMany test on dht_test in commits
before this one). Thankfully, ctxgroup saved the day with
almost _zero_ changes to the sync flow, and now we have the
guarantee that the query runner will only exit if all its
children are done. ❤️
Conflicts:
routing/dht/query.go
2014-12-24 02:13:38 -08:00
Juan Batiz-Benet
a4021eb433
ctxio -- io with a context.
...
This commit introduces a reader and writer that respect
contexts. Warning: careful how you use them. Returning
leaves a goroutine reading until the read finishes.
2014-12-24 02:10:56 -08:00
Juan Batiz-Benet
0013415db8
net/interface: move more to Dialer
2014-12-24 02:10:56 -08:00
Juan Batiz-Benet
7d7e051101
dht bootstrap err check fix + logging
2014-12-24 02:10:52 -08:00
Juan Batiz-Benet
596602f37f
routing table: better printing (see bkts)
2014-12-24 02:09:06 -08:00
Juan Batiz-Benet
ea2706c698
dht bugfix: unlock on print
2014-12-24 01:50:00 -08:00
Juan Batiz-Benet
04f9805d5d
dht_test large providers test
2014-12-24 01:49:55 -08:00
Juan Batiz-Benet
c43e8fa35b
fixing race in testutil port
2014-12-23 17:59:35 -08:00
Juan Batiz-Benet
fd2875f2ed
fixing race in swarm
2014-12-23 17:59:24 -08:00
Juan Batiz-Benet
32589ad4bb
Merge pull request #466 from jbenet/peer-restrict
...
The Peer is Dead. Long live the ID
2014-12-23 09:44:27 -08:00
Juan Batiz-Benet
a5018fcc0b
net/mock: interface addresses
2014-12-23 09:23:32 -08:00
Brian Tiger Chow
bd45adfb89
chore(bitswap) remove Peerstore() methods from bitswap.Network interface
2014-12-23 09:22:17 -08:00
Brian Tiger Chow
c34132e080
refactor(bitswap) change PeerInfo to ID in bitswap package
...
@jbenet @whyrusleeping
This commit replaces peer.PeerInfo with peer.ID in the bitswap package
2014-12-23 09:21:08 -08:00
Brian Tiger Chow
27dc9594ba
refactor(bitswap) bitswap.Network now abstracts ipfs.Network + ipfs.Routing
...
@jbenet @whyrusleeping
the next commit will change bitswap.Network.FindProviders to only deal
with IDs
2014-12-23 09:19:21 -08:00
Brian Tiger Chow
c6294646e9
fix(bitswap) always add addresses
2014-12-23 09:17:40 -08:00
Brian Tiger Chow
070b633df8
style(bitswap) rename to network
2014-12-23 09:16:00 -08:00
Brian Tiger Chow
60f3a874c2
feat(bitswap/network) expose peerstore
2014-12-23 09:14:54 -08:00
Brian Tiger Chow
a225568ff6
style(bitswap) public methods at top
2014-12-23 09:13:17 -08:00
Brian Tiger Chow
4ab4da7e2b
style(bitswap) rename
2014-12-23 09:10:44 -08:00
Brian Tiger Chow
fb75184c35
fix(bitswap) always use prvivate send method to send
...
cc @whyrusleeping
2014-12-23 09:09:34 -08:00