Simplify trait bounds in network to prepare for collator-rpc (#12082)

* Hack towards PoC

* Abstract away runtime requirement

* blockchainevents

* Remove bitswap

* Remove unused sync more

* Remove unused features in network

* Re-enable bitswap change

* Remove `Chain` trait bound

* Reimplement blockchain-rpc-events

* Move network to cumulus

* Make AuthorityDiscovery async

* Remove `ProofProvider` requirement from network behaviour

* Extract bitswap

* Adjustments after merge

* Remove HeaderMetadata trait from network

* Introduce NetworkHeaderBackend

* Add comments

* Improve comments

* Move NetworkHeaderBackend to new module

* Improve naming, remove redundand send + sync

* Clean up generics

* Fix CI

* Improve comment and readability

* Remove NetworkHeaderBackend

* Fix Cargo.lock

Co-authored-by: Sebastian Kunert <skunert@Sebastians-MacBook-Pro.fritz.box>
This commit is contained in:
Sebastian Kunert
2022-08-31 14:55:46 +02:00
committed by GitHub
parent 30951822ba
commit 800bc5cd8c
14 changed files with 165 additions and 155 deletions
+4 -1
View File
@@ -31,7 +31,7 @@ pub use sc_network_common::{
pub use libp2p::{build_multiaddr, core::PublicKey, identity};
use crate::ExHashT;
use crate::{bitswap::Bitswap, ExHashT};
use core::{fmt, iter};
use futures::future;
@@ -80,6 +80,9 @@ where
/// Client that contains the blockchain.
pub chain: Arc<Client>,
/// Bitswap block request protocol implementation.
pub bitswap: Option<Bitswap<B>>,
/// Pool of transactions.
///
/// The network worker will fetch transactions from this object in order to propagate them on