Implement request-responses protocols (#6634)

* Implement request-responses protocols

* Add tests

* Fix sc-cli

* Apply suggestions from code review

Co-authored-by: Max Inden <mail@max-inden.de>

* Fix naming

* Fix other issues

* Other naming fix

* Fix error logging

* Max sizes to u64

* Don't kill connections on refusal to process

* Adjust comment

Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
Pierre Krieger
2020-08-27 14:53:20 +02:00
committed by GitHub
parent 5b7af66384
commit 37d0e00d83
9 changed files with 1183 additions and 65 deletions
+4 -6
View File
@@ -253,6 +253,7 @@ mod finality_requests;
mod light_client_handler;
mod on_demand_layer;
mod protocol;
mod request_responses;
mod schema;
mod service;
mod transport;
@@ -263,13 +264,10 @@ pub mod error;
pub mod gossip;
pub mod network_state;
pub use service::{NetworkService, NetworkWorker};
pub use protocol::PeerInfo;
pub use protocol::event::{Event, DhtEvent, ObservedRole};
pub use protocol::sync::SyncState;
pub use libp2p::{Multiaddr, PeerId};
#[doc(inline)]
pub use libp2p::multiaddr;
pub use libp2p::{multiaddr, Multiaddr, PeerId};
pub use protocol::{event::{DhtEvent, Event, ObservedRole}, sync::SyncState, PeerInfo};
pub use service::{NetworkService, NetworkWorker, RequestFailure, OutboundFailure};
pub use sc_peerset::ReputationChange;
use sp_runtime::traits::{Block as BlockT, NumberFor};