Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration to Stable Futures and Network Refactor #209

Merged
merged 20 commits into from
Feb 4, 2020
Merged

Conversation

ec2
Copy link
Member

@ec2 ec2 commented Feb 3, 2020

Summary of changes
Changes introduced in this pull request:

  • Remove the need for the network crate
  • Migrate to Stable Futures and async-std instead of Tokio

Reference issue to close (if applicable)

Closes
#142

Other information and links

@claassistantio
Copy link

claassistantio commented Feb 3, 2020

CLA assistant check
All committers have signed the CLA.

node/forest_libp2p/src/behaviour.rs Outdated Show resolved Hide resolved
node/forest_libp2p/src/behaviour.rs Outdated Show resolved Hide resolved
node/forest_libp2p/src/service.rs Show resolved Hide resolved
node/forest_libp2p/src/service.rs Outdated Show resolved Hide resolved
node/forest_libp2p/src/service.rs Outdated Show resolved Hide resolved
node/forest_libp2p/src/service.rs Show resolved Hide resolved
node/forest_libp2p/src/service.rs Show resolved Hide resolved
node/src/main.rs Show resolved Hide resolved
node/src/main.rs Outdated Show resolved Hide resolved
node/src/main.rs Outdated Show resolved Hide resolved
blockchain/chain/Cargo.toml Outdated Show resolved Hide resolved
node/forest_libp2p/Cargo.toml Outdated Show resolved Hide resolved
let peer_id = PeerId::from(net_keypair.public());

info!(log, "Local peer id: {:?}", peer_id);

let transport = build_transport(net_keypair.clone());

let mut swarm = {
let be = MyBehaviour::new(log.clone(), &net_keypair);
let be = ForestBehaviour::new(log.clone(), &net_keypair);
Swarm::new(transport, be, peer_id)
};

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although not changed in this PR, should we avoid unwrapping on Swarm::listen_on on LN 86 (below).

I don't see why Github does not allow to comment on code unchanged in pr reviews, saw it being requested here as a feature interestingly.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like yall commented on it last time. And I don’t see how you can handle that kinda error. If you cant even listen_on, we shouldn’t handle that

@ec2 ec2 merged commit 477930d into master Feb 4, 2020
@ec2 ec2 deleted the ec2/network-refactor branch February 4, 2020 19:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Network Libp2p and PubSub stuff Status: Needs Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants