Commit Graph

15 Commits

Author SHA1 Message Date
Brian Tiger Chow
cebeff43b9 style(bitswap/message) rename method -> AddBlock
to emphasize idempotence
2014-10-27 21:58:21 -07:00
Brian Tiger Chow
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
Brian Tiger Chow
0dba976070 style(bitswap) import 2014-10-25 04:14:23 -07:00
Brian Tiger Chow
7f40a08b12 fix(bitswap) rm todo 2014-10-25 04:14:17 -07:00
Brian Tiger Chow
c848202c7d fix(bitswap) move mutex up to strategy from ledger
addresses concurrent access in bitswap session
2014-10-24 16:17:15 -07:00
Juan Batiz-Benet
9ca87fbb93 peer.Peer is now an interface
![](http://m.memegen.com/77n7dk.jpg)
2014-10-20 03:26:46 -07:00
Jeromy
6e0cfb3273 removed error from return type of blocks.NewBlock() 2014-10-07 20:46:01 +00:00
Brian Tiger Chow
b85d1554cc doc(bitswap:strat) add note to remove blocks from peer's wantlist after
sending
2014-09-22 04:06:19 -07:00
Brian Tiger Chow
9d7ae40003 feat(bitswap) expose ability to toggle "niceness"
true -> always send to peer

false -> use ledger-based strategy described in IPFS paper draft 3
2014-09-22 04:06:19 -07:00
Brian Tiger Chow
767d6ca633 refac(bitswap, util) extract KeySet 2014-09-22 04:06:19 -07:00
Brian Tiger Chow
8213cfbaa4 docs(bitswap:strat) interface comments 2014-09-22 04:06:16 -07:00
Brian Tiger Chow
c80c8aa977 test(bitswap:testnet)
misc:
* test network client getting more than max
* test for find providers
* rename factory method
* local network
* misc test improvements
* test bitswap get block timeout
* test provider exists but cannot connect to peer
* test sending a message async over local network
2014-09-22 04:06:15 -07:00
Brian Tiger Chow
5cec6197ae test(exch:bs:strategy) test accounting consistency
> Why expose num bytes sent and received?

    Makes it easy to test consistency of the ledgers

> Got a better reason?

    Makes it possible to expose metrics to the people-facing API
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
ded1f8f5a8 fix(bitswap) compiler errors
didn't run tests after the refactor. apologies.
2014-09-22 04:06:13 -07:00
Brian Tiger Chow
fd086b9c48 refac(exchange) bitswap -> exchange/bitswap
Move go-ipfs/bitswap package to go-ipfs/exchange/bitswap

* Delineates the difference between the generic exchange interface and
  implementations (eg. BitSwap protocol)

  Thus, the bitswap protocol can be refined without having to overthink
  how future exchanges will work. Aspects common to BitSwap and other
  exchanges can be extracted out to the exchange package in piecemeal.

  Future exchange implementations can be placed in sibling packages next
  to exchange/bitswap. (eg. exchange/multilateral)
2014-09-22 04:06:13 -07:00