181ff4eab1
tq.Cancel -> tq.Remove
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
198aa1959a
it's not a queue yet but it's okay to name it as such
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
7280aac83f
perf: avoid lots of communication by signaling once at end of method
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
cc2a7312a2
add comment to fix race
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
b41fef2fff
refactor: remove peerKey type
...
we've been using maps with peers long enough now that this probably is
no longer necessary
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
286723d888
unexport task and taskList
...
the less bitswap has to know about, the easier it'll be for readers.
(This now returns Messages.)
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
93fde86d18
refactor: taskKey := p.Key() + block.Key()
...
for clarity and to avoid errors, define a function
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
460967839e
doc: comment
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
10e970c0cf
refactor: context first in argument list
...
(merely by convention)
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:43 -08:00
f66d94aaf1
fix: move the check into the function.
...
function should be a no-op when passed an empty slice
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
8c05c444a5
refactor: avoid loop reuse
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
2ea8ed81ac
refactor: change Tasks to Outbox
...
notice that moving the blockstore fetch into the manager removes the
weird error handling case.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
a495a014af
style constify variables
...
good to const until it's required for them to be variable.
TODO pass them in as configuration options
2014-12-17 23:44:42 -08:00
8bef1dce80
fix: move to callsite so public callers don't experience the internal timeout rule
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
5603b2e0a4
style: line wrapping
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
c0a18d9c08
fix(test): nil Blockstore
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
69dd260236
refactor peerSet
2014-12-17 23:44:42 -08:00
f533678724
avoid attaching context to object when it's not necessary.
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:42 -08:00
f028c44fd2
name findOrCreate
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:41 -08:00
1bced710b1
queue-like naming
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:41 -08:00
29ef238fa3
remove dead code
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:41 -08:00
86c438b6e1
refactor() message API
...
performing CR in the form of a PR. Let me know what you think.
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:41 -08:00
6389bfda6b
some cleanup before CR
2014-12-17 23:44:41 -08:00
2240272d85
change Provide RPC to not wait for an ACK, improves performance of 'Add' operations
2014-12-17 23:44:41 -08:00
90a30961de
renaming and removing empty strategy file
2014-12-17 23:44:41 -08:00
029e305f19
tasklist queue for bitswap tasks
2014-12-17 23:44:41 -08:00
cfbe92bc8b
rewrite sendWantlistToProviders
2014-12-17 23:44:40 -08:00
946d2a96f2
add locks to wantlist to avoid race condition
2014-12-17 23:44:40 -08:00
59f0ffb8c6
remove noisy statement
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:40 -08:00
da68475bcf
fix go version
...
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-17 23:44:40 -08:00
50aa37fec4
blockstore.ErrNotFound, and proper wantlist sorting
2014-12-17 23:44:40 -08:00
e7bba82dcb
add priorities to GetBlocks requests, and add waitgroup to sendWantListTo
2014-12-17 23:44:40 -08:00
3778eedff0
dont spawn so many goroutines when rebroadcasting wantlist
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
5b6a5e807f
implement bitswap roundWorker
...
make vendor
2014-12-17 23:44:39 -08:00
12b296ee1a
create wantlist object
2014-12-17 23:44:39 -08:00
c4a935c3e3
go complains about lack of buildable file
2014-12-17 23:44:39 -08:00
911b54e526
Merge pull request #443 from jbenet/ionet-conn
...
net-io
2014-12-17 23:32:35 -08:00
4da261001f
mocknet printer for printing
2014-12-17 23:25:41 -08:00
6acc152f0c
backpressure: explanation + more rounds
2014-12-17 23:25:41 -08:00
db7d7ae891
net: sending backpressure test
2014-12-17 23:25:41 -08:00
ccc17d2740
net: cool test for new stream backpressure
...
Sadly, as cool as this test is, it doesn't work
Because spdystream doesnt handle stream open backpressure
well. I'll see about rewriting that part when it becomes
a problem. More backpressure tests comming.
2014-12-17 23:25:41 -08:00
358b8a9984
net: testing protocol
2014-12-17 23:25:41 -08:00
ad43e1d462
testutil: peer gen with addrs
2014-12-17 23:25:41 -08:00
b573d66208
mocknet: internals test
...
Found bugs with it :)
2014-12-17 23:25:40 -08:00
f354fa849e
mocknet: FullMesh connects to self too.
...
@maybebtc thoughts on this? dialing self should be
**possible**, so we should in general test that we do
consider that case, but not sure if this is good to expose
to clients. thoughts?
Btw, on why dialing self should be possible, we may create
little protocols which we may have a node connect to self,
say across its interfaces to test connectivity, etc...
think of it like:
> server localhost:1234 &
> curl localhost:1234
2014-12-17 23:25:40 -08:00
b0a36aabcb
mocknet: bugfix on opening conns + printer
2014-12-17 23:25:40 -08:00
f1fc09ccee
mocknet: printing internal mocknet state
2014-12-17 23:25:40 -08:00
2ae9b27859
moved net/swarm2 -> swarm
2014-12-17 23:25:40 -08:00
5d019ad300
mocknet add test
2014-12-17 23:25:40 -08:00