mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 00:01:09 +00:00
Make ChainSpec implement Send (#5315)
This commit is contained in:
@@ -318,7 +318,7 @@ impl<G: RuntimeGenesis, E: serde::Serialize + Clone> ChainSpec<G, E> {
|
||||
impl<G, E> crate::ChainSpec for ChainSpec<G, E>
|
||||
where
|
||||
G: RuntimeGenesis,
|
||||
E: GetExtension + serde::Serialize + Clone,
|
||||
E: GetExtension + serde::Serialize + Clone + Send,
|
||||
{
|
||||
fn boot_nodes(&self) -> &[String] {
|
||||
ChainSpec::boot_nodes(self)
|
||||
|
||||
@@ -125,7 +125,7 @@ pub trait RuntimeGenesis: Serialize + DeserializeOwned + BuildStorage {}
|
||||
impl<T: Serialize + DeserializeOwned + BuildStorage> RuntimeGenesis for T {}
|
||||
|
||||
/// Common interface to `GenericChainSpec`
|
||||
pub trait ChainSpec: BuildStorage {
|
||||
pub trait ChainSpec: BuildStorage + Send {
|
||||
/// Spec name.
|
||||
fn name(&self) -> &str;
|
||||
/// Spec id.
|
||||
|
||||
@@ -131,7 +131,7 @@ where F: Send + 'static, L: Send +'static, U: Clone + Send + 'static
|
||||
}
|
||||
}
|
||||
|
||||
fn node_config<G: RuntimeGenesis + 'static, E: ChainSpecExtension + Clone + 'static> (
|
||||
fn node_config<G: RuntimeGenesis + 'static, E: ChainSpecExtension + Clone + 'static + Send> (
|
||||
index: usize,
|
||||
spec: &GenericChainSpec<G, E>,
|
||||
role: Roles,
|
||||
@@ -219,7 +219,7 @@ fn node_config<G: RuntimeGenesis + 'static, E: ChainSpecExtension + Clone + 'sta
|
||||
impl<G, E, F, L, U> TestNet<G, E, F, L, U> where
|
||||
F: AbstractService,
|
||||
L: AbstractService,
|
||||
E: ChainSpecExtension + Clone + 'static,
|
||||
E: ChainSpecExtension + Clone + 'static + Send,
|
||||
G: RuntimeGenesis + 'static,
|
||||
{
|
||||
fn new(
|
||||
@@ -324,7 +324,7 @@ pub fn connectivity<G, E, Fb, F, Lb, L>(
|
||||
full_builder: Fb,
|
||||
light_builder: Lb,
|
||||
) where
|
||||
E: ChainSpecExtension + Clone + 'static,
|
||||
E: ChainSpecExtension + Clone + 'static + Send,
|
||||
G: RuntimeGenesis + 'static,
|
||||
Fb: Fn(Configuration) -> Result<F, Error>,
|
||||
F: AbstractService,
|
||||
@@ -432,7 +432,7 @@ pub fn sync<G, E, Fb, F, Lb, L, B, ExF, U>(
|
||||
B: FnMut(&F, &mut U),
|
||||
ExF: FnMut(&F, &U) -> <F::Block as BlockT>::Extrinsic,
|
||||
U: Clone + Send + 'static,
|
||||
E: ChainSpecExtension + Clone + 'static,
|
||||
E: ChainSpecExtension + Clone + 'static + Send,
|
||||
G: RuntimeGenesis + 'static,
|
||||
{
|
||||
const NUM_FULL_NODES: usize = 10;
|
||||
@@ -503,7 +503,7 @@ pub fn consensus<G, E, Fb, F, Lb, L>(
|
||||
F: AbstractService,
|
||||
Lb: Fn(Configuration) -> Result<L, Error>,
|
||||
L: AbstractService,
|
||||
E: ChainSpecExtension + Clone + 'static,
|
||||
E: ChainSpecExtension + Clone + 'static + Send,
|
||||
G: RuntimeGenesis + 'static,
|
||||
{
|
||||
const NUM_FULL_NODES: usize = 10;
|
||||
|
||||
@@ -38,7 +38,7 @@ pub async fn browser_configuration<G, E>(chain_spec: GenericChainSpec<G, E>)
|
||||
-> Result<Configuration, Box<dyn std::error::Error>>
|
||||
where
|
||||
G: RuntimeGenesis + 'static,
|
||||
E: Extension + 'static,
|
||||
E: Extension + 'static + Send,
|
||||
{
|
||||
let name = chain_spec.name().to_string();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user