mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 02:51:01 +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:
@@ -26,7 +26,7 @@ use keyring::Keyring;
|
||||
use client::{
|
||||
BlockchainEvents, error::Result,
|
||||
blockchain::Backend as BlockchainBackend,
|
||||
runtime_api::{Core, RuntimeVersion, ApiExt, ConstructRuntimeApi, CallRuntimeAt},
|
||||
runtime_api::{Core, RuntimeVersion, ApiExt},
|
||||
};
|
||||
use test_client::{self, runtime::BlockNumber};
|
||||
use codec::Decode;
|
||||
@@ -265,7 +265,7 @@ impl Core<Block> for RuntimeApi {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
|
||||
fn execute_block(&self, _: &BlockId<Block>, _: &Block) -> Result<()> {
|
||||
fn execute_block(&self, _: &BlockId<Block>, _: Block) -> Result<()> {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
|
||||
@@ -291,12 +291,6 @@ impl ApiExt<Block> for RuntimeApi {
|
||||
}
|
||||
}
|
||||
|
||||
impl ConstructRuntimeApi<Block> for RuntimeApi {
|
||||
fn construct_runtime_api<'a, T: CallRuntimeAt<Block>>(_: &'a T) -> ApiRef<'a, Self> {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
}
|
||||
|
||||
impl GrandpaApi<Block> for RuntimeApi {
|
||||
fn grandpa_authorities(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user