1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-07-01 02:30:39 +08:00

1242 Commits

Author SHA1 Message Date
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
40ab1886fc Merge pull request #205 from jbenet/fix/move_proto_dht
redux: refactor(dht/pb) move proto to pb package
2014-10-25 04:28:20 -07:00
0dba976070 style(bitswap) import 2014-10-25 04:14:23 -07:00
7f40a08b12 fix(bitswap) rm todo 2014-10-25 04:14:17 -07:00
29457214cb refactor(dht/pb) move proto to pb package 2014-10-25 04:13:28 -07:00
2ce41870f4 Merge pull request #203 from jbenet/govet
go-vet friendly code
2014-10-25 03:55:40 -07:00
184c25430b 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
210b5df78c use my go-logging fork
until https://github.com/op/go-logging/pull/30 is merged
2014-10-25 03:43:17 -07:00
762faa7421 rewrite findpeer and other dht tweaks 2014-10-24 18:53:36 -07:00
f73d632354 Merge pull request #198 from jbenet/fix/bitswap-races
fix(bitswap) data races
2014-10-24 16:26:26 -07:00
c848202c7d fix(bitswap) move mutex up to strategy from ledger
addresses concurrent access in bitswap session
2014-10-24 16:17:15 -07:00
715f5f4a19 fix(blockstore, bitswap) enforce threadsafety in blockstore
fixes data race detected in a testnet test
2014-10-24 16:16:41 -07:00
bd5a1c0c0f Merge pull request #192 from jbenet/dhtfixes
dht fixes
2014-10-22 22:20:36 -07:00
d374cc6900 Merge pull request #194 from jbenet/fix/move_proto
refactor(pb) move protos to internal packages
2014-10-22 22:13:17 -07:00
a1b61f399c refactor(unixfs/pb) mv proto PBData -> Data, etc. 2014-10-22 21:52:59 -07:00