Commit Graph

69 Commits

Author SHA1 Message Date
724d0f5d82 Remove the old API (#565)
* Remove the old API

* Fix integration test
2018-10-15 16:17:55 +01:00
d81f4e264f Add unit tests for core::nodes::NodeStream (#535)
* Add unit tests for core::nodes::NodeStream

* Move DummyMuxer to core/tests

* Address grumbles

* Impl Debug for SubstreamRef<P>

* Add test for poll()

* Don't need to open a substream

* pretty printer test

* More tests for NodeStream poll()

* Remove contentious test of Debug
2018-10-05 11:55:32 +02:00
84b089cacc Refactor multiaddr crate. (#498)
Refactor multiaddr crate.

- Remove `AddrComponent`. Instead `Protocol` directly contains its
associated data.

- Various smaller changes around conversions to Multiaddr from other
types, e.g. socket addresses.

- Expand tests to include property tests which test encoding/decoding
identity.
2018-09-20 19:51:00 +02:00
1969bde4fe Rework the Ping protocol (#497)
* Rework the Ping upgrade

* Fix concerns
2018-09-20 16:55:57 +02:00
063ab178a9 Add an alternative to the swarm (#472)
* Rewrite the swarm

* Small improvement to Debug of ListenersStream

* Fix Swarm::Replaced never being produced

* Fix logic problem when reaching a node in swarm

* Small comment in swarm

* Add closed_multiaddr to Replaced event

* Add address to NodeClosed and NodeError

* Fix concerns

* Remove StreamMuxer::boxed
2018-09-14 13:18:10 +02:00
75ceba7809 The SwarmFuture is now a Stream (#442)
* The SwarmFuture is now a Stream

* Return the produced future in the message

* Remove IncomingConnection event

* Pass error when failing to dial

* Fix loop break mistake

* Fix concern

* Rename SwarmFuture to SwarmEvents

* Increase type length limit

* Remove todo
2018-09-04 14:53:27 +02:00
c77b1f5a0a Better documentation (#391)
* Better documentation

* Minor
2018-08-22 10:46:23 +02:00
ea881e3dfa Rework swarm and allow interrupting a dial (#366)
* Rework swarm and allow interrupting a dial
* Improve the UniqueConnec situation
* Remove UniqueConnec::get
* Rename `get_or_dial()` to `dial()` and add `dial_if_empty()`
* Clean the UniqueConnec is the future is dropped
* Rename `set_until` to `tie_or_stop` and add `tie_or_passthrough`
* Add some tests, docs
* Fix memory leak with tasks registration
* Interrupt dialing when a UniqueConnec is dropped or cleared
2018-08-08 12:00:38 +02:00
0348ac3534 Make ping unidirectional (#381) 2018-08-06 17:16:27 +02:00
81e8735968 Add memory transport. (#343)
* Add memory transport.

* Change test to be compatible with rust stable.

* Address concerns

* Add some documentation and minor fixes

* Move transport test to memory module
2018-07-25 13:44:27 +02:00
053197bd1c Rework the Kademlia high-level system (#282)
* Kademlia high-level rework

* Some changes in the rework

* Some additional tweaks to kad rework

* Add update_kbuckets

* Rename a bunch of Kademlia stuff

* Add KadSystem::local_peer_id

* Some documentation update

* Concern

* Make the example compile

* Make things nicer

* Fix bug in UniqueConnec

* Add clear() to UniqueConnec

* Add UniqueConnec::poll

* Fix potential deadlock in UniqueConnec

* Add UniqueConnec::state()

* The future of get now contains a Weak

* Fix concerns
2018-07-17 15:51:11 +02:00
16e3453b7f Use the new version of tokio (#303) 2018-07-16 12:15:27 +02:00
143a1845b1 The PeerId is the hash of the protobuf encoding (#276) 2018-06-25 17:56:36 +02:00
795961b15e Fix the public key format in the IdentifyInfo (#264)
* Fix the public key format in the IdentifyInfo

* Move PublicKey type to core

* Oops
2018-06-25 14:54:55 +02:00
28fdf23d67 Add some regression tests in libp2p-core (#237) 2018-06-05 19:01:18 +02:00
dbbee5756e Use stronger typing for the public key of identify (#236)
* Use stronger typing for the public key of identify

* Add PartialEq/Eq implementations

* Fix tests

* Also change is_public_key()
2018-06-05 12:29:59 +02:00
c1cd10c034 upgrade::or() requires same Output (#218) 2018-05-24 16:37:12 +02:00
89087f021d Move PeerId to libp2p-core (#214) 2018-05-24 00:54:08 +02:00
5c1890e66a Rename libp2p_swarm to libp2p_core (#189) 2018-05-16 12:59:36 +02:00