1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-30 09:59:13 +08:00

2101 Commits

Author SHA1 Message Date
43ff3c5040 style(blockservice) s/Remote/Exchange
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 23:31:01 -08:00
f7cb6b9963 fix: respect ctx on receive
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 22:54:16 -08:00
27bed4b2c8 Merge pull request #395 from jbenet/misc/2014-11-11th-hour
miscellaneous +/- (commands, dht, net)
2014-12-05 21:00:40 -08:00
f870948274 fix: multiconn s/Conns()/getConns()
@jbenet

must be getConns to avoid clash with private var

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:28 -08:00
697453dfc2 fix(cmd/bootstrap) s/remove/rm
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:28 -08:00
251b916ce9 style: readability
@jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:28 -08:00
1026244f13 fix(net/mux) rate-limit producers by handling outgoing message synchronously
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
0f6b1bc73e fix(dht/routing) buffer promise response to prevent resource leak
When performing this "promise" pattern, it is important to
provide a
channel with space for one value. Otherwise the sender may
block forever
in the case of a receiver that decides to abandon the
request. A subtle
detail, but one that is important for avoiding
leaked goroutines.

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow
<brian@perfmode.com>

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
de374226be 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
f756088d26 fix(routing/dht) _always_ close chan on exit of FindProvidersAsync
the important change here is that within FindProvidersAsync, the channel
is closed using a `defer`. This ensures the channel is always closed,
regardless of the path taken to exit.

+ misc cleanup

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:27 -08:00
c80a7941d1 commands/cli: Fixed file path formatting on Windows 2014-12-05 20:56:27 -08:00
5cb39235cc commands/http: Fixed bug with client arg querystring 2014-12-05 20:56:27 -08:00
4c7a694409 commands/http: Fixed client panic when sending a Request with nil 'Files' 2014-12-05 20:56:27 -08:00
c91805d7bd core/commands: Fixed build on Windows 2014-12-05 20:56:26 -08:00
4882904c3e fix: s/bootstrap rm/boostrap remove
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
3bdb36614e fix(cmd/id) determine offline-ness with !node.OnlineMode()
It's better to have one mechanism for determining whether we're offline
and to improve the SnR of this mechanism over time. We presently have
too many arbitrary heuristics for determining whether we're running in
offline mode. TRTTD is to use polymorphism to eliminate these
conditional checks. (instantiate the node with offline versions of
routing, network, etc.) It'll clean up the core constructor, make it
easier to create ephemeral nodes, and eliminate a class of errors.

@whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
65c6bd07bf feat(core/commands): expose commands to allow for the development of high-level interface
+ style: sort command list

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
229c93f72f fix(net/multiconn) data race in test
https://build.protocol-dev.com/job/go-ipfs.test.go.race.nofuse/276/console

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:56:26 -08:00
d79ba526dd Merge pull request #386 from jbenet/bithack
complete Bithack changes
2014-12-06 00:20:59 +00:00
260ac96175 Update README.md 2014-12-05 20:53:36 +00:00
afa28dc672 update bitswap readme 2014-12-05 20:53:36 +00:00
f054be9e1f update bitswap readme 2014-12-05 20:53:35 +00:00
260ace7f81 util keys need to be pointers for loggable 2014-12-05 20:53:33 +00:00
6552163740 add readme for bitswap 2014-12-05 20:53:33 +00:00
432eee651f remove unnecessary concurrency in last commit 2014-12-05 20:53:33 +00:00
e8536db351 make bitswap sub-RPC's timeout (slowly for now) 2014-12-05 20:53:33 +00:00
514b26e2b8 remove sigquit from handled signals 2014-12-05 20:53:33 +00:00
c2b497e315 switch over to using sendMessage vs sendRequest 2014-12-05 20:53:32 +00:00
3a6b6c6974 cleanup, use a workgroup over channels 2014-12-05 20:53:32 +00:00
9835c1e335 doc(bitswap) fix duplicaduplication
@whyrusleeping

ada571425b (commitcomment-8753622)

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:32 +00:00
bc02b77b47 document bitswap more 2014-12-05 20:53:32 +00:00
f0a4fdad59 some bitswap cleanup 2014-12-05 20:53:32 +00:00
1e7b7efa76 refactor(bitswap) perform Publish in HasBlock
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:32 +00:00
829eac3012 fix(bitswap) pass derived context to called functions
@whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:31 +00:00
bb0b5f7c0b fix(notifications) prevent deadlock when context cancelled early
+ test(notifications)

cc @whyrusleeping @jbenet

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:31 +00:00
7a3819a528 refactor(util) move block generator
@whyrusleeping @jbenet

Putting the block generator in a util dir until blocks.

Can't put it in util/testutil because the util/testutil/dag-generator
imports blockservice and blockservice uses the generator.

Tough problem. This'll do for now.

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:31 +00:00
d06343083e add a test in merkledag to exercise GetBlocks 2014-12-05 20:53:31 +00:00
4cc1780705 fix issues in merkledag 2014-12-05 20:53:31 +00:00
d721c448af reset test to the way it ways before
@whyrusleeping

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:31 +00:00
e27de2bfa2 fix(blockservice) respect context in GetBlocks
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
bef75d5061 fix(bitswap/testutils) vendor
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
fb5779661b fix(bs/notifications) use SubOnceEach to provide uniqueness guarantee
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>

vendor forked pubsub to get SubOnceEach

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
19de3041fb fix(bitswap) build-breaking compilation errors
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
aac3c6abbd fix(blockservice) test
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:30 +00:00
07bb901ed5 add a test to blockservice to demonstate GetBlocks failure. 2014-12-05 20:53:29 +00:00
6d217b5311 ensure sending of wantlist to friendly peers 2014-12-05 20:53:29 +00:00
9bf1ba6ab5 fix(bs/notifications) prevent duplicates
@whyrusleeping now notifications _guarantees_ there won't be any
duplicates

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
20382340f5 test(bs/n) check for duplicates received
License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00
e393edcc28 Revert "hotfix(dep) duplicates TEMP DONT MERGE TO MASTER"
This reverts commit 49004e9743110ba69c07852c3a105dac2e01e1c4.
2014-12-05 20:53:29 +00:00
044db5bee8 hotfix(dep) duplicates TEMP DONT MERGE TO MASTER
before merging, fork and send a PR to tuxy

License: MIT
Signed-off-by: Brian Tiger Chow <brian@perfmode.com>
2014-12-05 20:53:29 +00:00