mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 08:11:04 +00:00
Make runtime api calls native when possible (#1302)
* Add simple benchmark for the runtime api * Make the executor support native calls * Some documentation * Hide behind `feature = "std"` * Rework the native calls * Make all tests compile again * Make every parameter using the Block serialized/deserialized in the native call * Forward `UnwindSafe` requirement * Remove debug stuff * Add some documentation * Fixes warnings * Fixes errors after master rebase * Fixes compilation after master rebase * Fixes compilation after rebase
This commit is contained in:
@@ -181,10 +181,7 @@ impl<F: ServiceFactory> TestNet<F> {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn connectivity<F: ServiceFactory, Inherent>(spec: FactoryChainSpec<F>) where
|
||||
<F as ServiceFactory>::RuntimeApi:
|
||||
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, Inherent>
|
||||
{
|
||||
pub fn connectivity<F: ServiceFactory, Inherent>(spec: FactoryChainSpec<F>) {
|
||||
const NUM_NODES: u32 = 10;
|
||||
{
|
||||
let temp = TempDir::new("substrate-connectivity-test").expect("Error creating test dir");
|
||||
@@ -228,9 +225,6 @@ where
|
||||
F: ServiceFactory,
|
||||
B: Fn(&F::FullService) -> ImportBlock<F::Block>,
|
||||
E: Fn(&F::FullService) -> FactoryExtrinsic<F>,
|
||||
<F as ServiceFactory>::RuntimeApi:
|
||||
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, ()> +
|
||||
client::runtime_api::TaggedTransactionQueue<<F as service::ServiceFactory>::Block>
|
||||
{
|
||||
const NUM_NODES: u32 = 10;
|
||||
const NUM_BLOCKS: usize = 512;
|
||||
@@ -265,10 +259,8 @@ where
|
||||
}
|
||||
|
||||
pub fn consensus<F>(spec: FactoryChainSpec<F>, authorities: Vec<String>)
|
||||
where
|
||||
F: ServiceFactory,
|
||||
<F as ServiceFactory>::RuntimeApi:
|
||||
client::block_builder::api::BlockBuilder<<F as service::ServiceFactory>::Block, ()>
|
||||
where
|
||||
F: ServiceFactory,
|
||||
{
|
||||
const NUM_NODES: u32 = 20;
|
||||
const NUM_BLOCKS: u64 = 200;
|
||||
|
||||
Reference in New Issue
Block a user