mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 22:11:02 +00:00
Implement support for renaming runtime api functions (#2160)
* Implement support for renaming runtime api functions * Redelete the wasm files * FIxes test * Fix test correctly... * Bring back old `authorities` * Tag as deprecated * Fixes compilation on WASM * Add missing method implementations * Fixes tests * Increase `spec_version`
This commit is contained in:
@@ -267,7 +267,7 @@ impl ProvideRuntimeApi for TestApi {
|
||||
}
|
||||
|
||||
impl Core<Block> for RuntimeApi {
|
||||
fn version_runtime_api_impl(
|
||||
fn Core_version_runtime_api_impl(
|
||||
&self,
|
||||
_: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
@@ -277,7 +277,7 @@ impl Core<Block> for RuntimeApi {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
|
||||
fn execute_block_runtime_api_impl(
|
||||
fn Core_execute_block_runtime_api_impl(
|
||||
&self,
|
||||
_: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
@@ -287,7 +287,7 @@ impl Core<Block> for RuntimeApi {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
|
||||
fn initialize_block_runtime_api_impl(
|
||||
fn Core_initialize_block_runtime_api_impl(
|
||||
&self,
|
||||
_: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
@@ -296,6 +296,15 @@ impl Core<Block> for RuntimeApi {
|
||||
) -> Result<NativeOrEncoded<()>> {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
fn Core_authorities_runtime_api_impl(
|
||||
&self,
|
||||
_: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
_: Option<()>,
|
||||
_: Vec<u8>,
|
||||
) -> Result<NativeOrEncoded<Vec<AuthorityId>>> {
|
||||
unimplemented!("Not required for testing!")
|
||||
}
|
||||
}
|
||||
|
||||
impl ApiExt<Block> for RuntimeApi {
|
||||
@@ -312,7 +321,7 @@ impl ApiExt<Block> for RuntimeApi {
|
||||
}
|
||||
|
||||
impl GrandpaApi<Block> for RuntimeApi {
|
||||
fn grandpa_authorities_runtime_api_impl(
|
||||
fn GrandpaApi_grandpa_authorities_runtime_api_impl(
|
||||
&self,
|
||||
at: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
@@ -326,7 +335,7 @@ impl GrandpaApi<Block> for RuntimeApi {
|
||||
}
|
||||
}
|
||||
|
||||
fn grandpa_pending_change_runtime_api_impl(
|
||||
fn GrandpaApi_grandpa_pending_change_runtime_api_impl(
|
||||
&self,
|
||||
at: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
@@ -343,7 +352,7 @@ impl GrandpaApi<Block> for RuntimeApi {
|
||||
Ok(self.inner.scheduled_changes.lock().get(&parent_hash).map(|c| c.clone())).map(NativeOrEncoded::Native)
|
||||
}
|
||||
|
||||
fn grandpa_forced_change_runtime_api_impl(
|
||||
fn GrandpaApi_grandpa_forced_change_runtime_api_impl(
|
||||
&self,
|
||||
at: &BlockId<Block>,
|
||||
_: ExecutionContext,
|
||||
|
||||
Reference in New Issue
Block a user