mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 04:37:57 +00:00
Make API backwards compatible with CC (#1697)
* Rework how a runtime api calls into the runtime Now we generate a default implementation for each api call that calls a generated method `method_runtime_api_impl`. This newly generated method is the one that will be implemented by the `impl_runtime_apis` macro in the runtime for the client side. * Support `changed_in` to change runtime api function signatures * Update documentation * Fixes tests * Implement checking the api version with a predicate * Make the implementation backwards compatible with CC * Update wasm files after merge * Check for wasm runtime differences by building master and current branch * Update spec_version and wasm files * Fixes * Revert my changes * Remove `patch.crates-io` from test-runtime
This commit is contained in:
@@ -96,10 +96,10 @@ impl<B, E, Block, RA> AuthoringApi for SubstrateClient<B, E, Block, RA> where
|
||||
let mut block_builder = self.new_block_at(at)?;
|
||||
|
||||
let runtime_api = self.runtime_api();
|
||||
if runtime_api.has_api::<BlockBuilderApi<Block>>(at)? {
|
||||
runtime_api.inherent_extrinsics(at, inherent_data)?
|
||||
.into_iter().try_for_each(|i| block_builder.push(i))?;
|
||||
}
|
||||
// We don't check the API versions any further here since the dispatch compatibility
|
||||
// check should be enough.
|
||||
runtime_api.inherent_extrinsics(at, inherent_data)?
|
||||
.into_iter().try_for_each(|i| block_builder.push(i))?;
|
||||
|
||||
build_ctx(&mut block_builder);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user