1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 19:24:14 +08:00

1056 Commits

Author SHA1 Message Date
c534daef86 refactor(namesys) use one-off error 2014-10-28 15:27:00 -07:00
04e270a91e refactor(merkledag) use one-off error 2014-10-28 15:27:00 -07:00
1f9541d29b refactor(blockservice) export blockservice.ErrNotFound 2014-10-28 15:27:00 -07:00
cee1e9ccda Merge pull request #223 from jbenet/issue-209
refactor(routing) replace u.ErrNotFound with routing.ErrNotFound
2014-10-28 15:25:49 -07:00
cb3a8bfc96 Merge pull request #216 from jbenet/fix/bsmsg-duplicates
fix(bitswap/message) duplicate entries
2014-10-28 15:21:38 -07:00
e0f4000fcf style(routing) message 2014-10-28 05:12:54 -07:00
321eb421e7 refactor(routing) use routing.ErrNotFound 2014-10-28 02:17:46 -07:00
f75f4a4b6d feat(routing) define routing.ErrNotFound 2014-10-28 01:06:28 -07:00
42dfc50250 docs(bitswap/message) BitSwapMessage interface 2014-10-27 22:43:54 -07:00
edf99f5e20 fix(bitswap) preserve ordering in bitswap message 2014-10-27 22:43:54 -07:00
91a31a3e7d test(bitswap/message) no duplicates 2014-10-27 21:58:21 -07:00
cebeff43b9 style(bitswap/message) rename method -> AddBlock
to emphasize idempotence
2014-10-27 21:58:21 -07:00
caedb64697 fix(bitswap/message) impl with map to ensure no duplicate blocks
comes at the cost of O(n) Blocks() method.
2014-10-27 21:58:21 -07:00
2c4fefb9d6 style(bitswap/message) rename struct
so there's one less name to think about
2014-10-27 21:58:20 -07:00
f94d6a37b6 refactor(bitswap/message) use map to prevent duplicate entries
A nice invariant for bitswap sessions:

        Senders and receivers can trust that messages do not contain
        duplicate blocks or duplicate keys. Backing the message with a
        map enforces this invariant.

        This comes at the cost of O(n) getters.
2014-10-27 21:58:20 -07:00
842b910853 style(bitswap/message) rename AppendWanted -> AddWanted
implementation will be patched to ensure bitswap messages cannot contain
duplicate blocks or keys
2014-10-27 21:58:20 -07:00
8193049dda fix(bitswap) duplicate key in wantlist
@whyrusleeping noticed this a couple days ago

potential long-term fix: prevent duplicate entries in the wantlist by
using a map/set and iterating over this data structure on export
2014-10-27 21:58:20 -07:00
e8ec8ce9bb Merge pull request #219 from jbenet/revert-218-fix/2014-10-29-mux-rwmutex
Revert "perf(mux) use RWMutex"
2014-10-27 21:13:19 -07:00
3323952401 Revert "perf(mux) use RWMutex" 2014-10-27 21:12:03 -07:00
77b6361c82 Merge pull request #218 from jbenet/fix/2014-10-29-mux-rwmutex
perf(mux) use RWMutex
2014-10-27 20:44:06 -07:00
ed0556b919 perf(mux) use RWMutex 2014-10-27 20:36:45 -07:00
0197fe6046 Merge pull request #213 from jbenet/tour
ipfs tour
2014-10-27 11:46:58 -07:00
0ee4b3ec77 tour list: left justify 2014-10-26 10:03:38 -07:00
6f7bab389e tour: command 2014-10-26 08:32:08 -07:00
b4ea414c4c Merge pull request #211 from chriscool/improve_tests
Improve tests
2014-10-26 05:10:18 -07:00
8357c7b13d Add test script for ipfs init
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-10-26 10:10:22 +01:00
07bd18b53d Display which Makefile target is launched
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-10-26 10:10:22 +01:00
54c2a14c10 nocolor log fmt 2014-10-26 01:44:11 -07:00
ef6d735019 updates: dont count dev versions as older
- if equinox says there is a new update, but the version number IS NOT
larger, we interpret that as no update (you may have gotten a newer
version by building it yourself).

- Also export ErrNoUpdateAvailable so clients don't also need to
import the equinox library to check the error.

cc @cryptix comments?
2014-10-26 01:38:44 -07:00
be1c10f30f Merge pull request #208 from jbenet/ctxcloserify
ContextCloserify
2014-10-25 21:38:20 -07:00
d79ebe68d2 dht ctxcloserify 2014-10-25 21:33:59 -07:00
4584bc8d18 clean up core initialization
- less floating variables
2014-10-25 21:33:59 -07:00
8cf22c062f core is now ctxcloser 2014-10-25 21:33:10 -07:00
90b989a718 AddCloserChild + net ctxcloser 2014-10-25 21:33:10 -07:00
f2b8803a57 net/service now uses ctxcloser 2014-10-25 21:33:10 -07:00
93497c2d00 muxer now uses ctxCloser 2014-10-25 21:33:10 -07:00
08edaf87fb Merge pull request #191 from ehmry/dagservice-interface
convert DAGService to an interface
2014-10-25 21:16:09 -07:00
056699cebe convert DAGService to an interface 2014-10-25 22:15:19 -04:00
39316a210f Merge pull request #210 from jbenet/whydev
Fix logs + msgio error
2014-10-25 18:37:59 -07:00
d92db12460 lots of logging 2014-10-26 00:45:40 +00:00
ab7491f809 logging, logging, and some minor logging 2014-10-25 14:50:22 -07:00
47e7583464 Add test/.gitignore to ignore test-results/
License: MIT
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
2014-10-25 22:25:18 +02:00
e1f2fe75f8 add in dag removal 2014-10-25 12:39:36 -07:00
87407a99b9 add context to blockservice Get 2014-10-25 12:38:32 -07:00
c2692f3a9a Merge pull request #206 from chriscool/sharness3
Use Sharness as our shell test framework, version 3
2014-10-25 07:08:59 -07:00
aeb019f2b8 Add test/Makefile to run the test scripts
You can use it like this to launch all the
test scripts in order:

$ cd test
$ make
 rm -r test-results
 *** t0010-basic-commands.sh ***
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
 ./test-aggregate-results.sh
 fixed   0
 success 5
 failed  0
 broken  0
 total   5

Or you can just run one test like this:

$ make t0010-basic-commands.sh
 *** t0010-basic-commands.sh ***
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
2014-10-25 14:12:27 +02:00
0aebe75361 Add test-aggregate-results.sh
This script aggregates test results using Sharness.
2014-10-25 14:12:20 +02:00
1fb4192642 Move Sharness config checks into test-sharness-config.sh
This way we can easily reuse the checks in
test-sharness-config.sh.
2014-10-25 13:58:54 +02:00
12490cb477 Add t0010-basic-commands.sh
This checks a little bit the installation and some
basic commands.

You can run it like that:

$ cd test
$ ./t0010-basic-commands.sh
 ok 1 - current dir is writable
 ok 2 - ipfs version succeeds
 ok 3 - ipfs version output looks good
 ok 4 - ipfs help succeeds
 ok 5 - ipfs help output looks good
 # passed all 5 test(s)
 1..5
2014-10-25 13:57:19 +02:00
449523eebd Add test-lib.sh for our shell test framework
Our test framework is based on Sharness.
So the first thing to do is to source it.
2014-10-25 13:53:57 +02:00