mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-20 21:01:03 +00:00
Some fixes required for Cumulus (#766)
* Add some more bounds * More bounds * More fixes * More fixes
This commit is contained in:
committed by
Gavin Wood
parent
16043df46f
commit
9ec65c94d7
@@ -461,7 +461,7 @@ fn do_validation<P>(
|
||||
&validation_code,
|
||||
params,
|
||||
ext.clone(),
|
||||
ExecutionMode::Remote,
|
||||
ExecutionMode::Local,
|
||||
) {
|
||||
Ok(result) => {
|
||||
if result.head_data == head_data.0 {
|
||||
|
||||
@@ -275,7 +275,7 @@ struct ParachainValidation<C, N, P> {
|
||||
}
|
||||
|
||||
impl<C, N, P> ParachainValidation<C, N, P> where
|
||||
C: Collators + Send + Unpin + 'static,
|
||||
C: Collators + Send + Unpin + 'static + Sync,
|
||||
N: Network,
|
||||
P: ProvideRuntimeApi<Block> + HeaderBackend<Block> + BlockBody<Block> + Send + Sync + 'static,
|
||||
P::Api: ParachainHost<Block> + BlockBuilderApi<Block> + ApiExt<Block, Error = sp_blockchain::Error>,
|
||||
@@ -436,18 +436,17 @@ impl<C, N, P> ParachainValidation<C, N, P> where
|
||||
ready(())
|
||||
});
|
||||
|
||||
|
||||
Some(res)
|
||||
Ok(Some(res))
|
||||
}
|
||||
Err(e) => {
|
||||
warn!(target: "validation", "Failed to produce a receipt: {:?}", e);
|
||||
None
|
||||
Ok(None)
|
||||
}
|
||||
}
|
||||
}
|
||||
Err(e) => {
|
||||
warn!(target: "validation", "Failed to collate candidate: {:?}", e);
|
||||
None
|
||||
Ok(None)
|
||||
}
|
||||
})
|
||||
};
|
||||
@@ -456,7 +455,12 @@ impl<C, N, P> ParachainValidation<C, N, P> where
|
||||
.map_ok(with_router)
|
||||
.map_err(|e| {
|
||||
warn!(target: "validation" , "Failed to build table router: {:?}", e);
|
||||
});
|
||||
})
|
||||
.and_then(|f| f)
|
||||
.and_then(|f| match f {
|
||||
Some(f) => f.map(Ok).boxed(),
|
||||
None => ready(Ok(())).boxed(),
|
||||
}).boxed();
|
||||
|
||||
let cancellable_work = select(exit, router).map(drop);
|
||||
|
||||
@@ -549,7 +553,7 @@ impl<C, N, P, SC, TxPool, B> ProposerFactory<C, N, P, SC, TxPool, B> where
|
||||
}
|
||||
|
||||
impl<C, N, P, SC, TxPool, B> consensus::Environment<Block> for ProposerFactory<C, N, P, SC, TxPool, B> where
|
||||
C: Collators + Send + Unpin + 'static,
|
||||
C: Collators + Send + Unpin + 'static + Sync,
|
||||
N: Network,
|
||||
TxPool: TransactionPool<Block=Block> + 'static,
|
||||
P: ProvideRuntimeApi<Block> + HeaderBackend<Block> + BlockBody<Block> + Send + Sync + 'static,
|
||||
|
||||
Reference in New Issue
Block a user