mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 05:47:58 +00:00
Adds new execution strategy nativeElseWasm (#1546)
* fix: adds new execution strategy nativeElseWasm and replace nativeWhenPossible with it * feat: adds cmd line params for execution strategies * fix: uses of cmd line execution strategies * chore: remove white spaces * chore: remove println * chore: remove whitespace * fix: generating functions with context * feat: add function to generate with_context declarations * fix: add implementation for with_context function calls * fix: add execution context to call_api_at function * fix: making use of context to select strategy for block_builder * chore: cleaning up * fix: merging issues * fix tests * add wasm files * chore: small doc for context fields * chore: delete redundant docs * fix: use full path for ExecutionContext * fix: add context functions from inside fold_item_impl * chore: remove clone * fix: moving generative function to utils, remove unused imports * fix: add missing full path for ExecutionContext * fix: merge issues * update wasm files * fix: update to keep up with changes in master * chore: remove unused functions, clean up * fix test * fix grumbles * fix: add more tests * fix: some refactorings * feat: add execution strategy to call * chore: small improvements * fix: add message to panic * fix tests
This commit is contained in:
@@ -37,8 +37,8 @@ use runtime_primitives::{
|
||||
create_runtime_str,
|
||||
traits::{
|
||||
BlindCheckable, BlakeTwo256, Block as BlockT, Extrinsic as ExtrinsicT,
|
||||
GetNodeBlockType, GetRuntimeBlockType
|
||||
}
|
||||
GetNodeBlockType, GetRuntimeBlockType,
|
||||
},
|
||||
};
|
||||
use runtime_version::RuntimeVersion;
|
||||
pub use primitives::hash::H256;
|
||||
@@ -215,6 +215,8 @@ cfg_if! {
|
||||
fn function_signature_changed() -> Vec<u64>;
|
||||
/// The new signature.
|
||||
fn function_signature_changed() -> u64;
|
||||
fn fail_on_native() -> u64;
|
||||
fn fail_on_wasm() -> u64;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -233,6 +235,8 @@ cfg_if! {
|
||||
fn fail_convert_return_value() -> DecodeFails<Block>;
|
||||
/// In wasm we just emulate the old behavior.
|
||||
fn function_signature_changed() -> Vec<u64>;
|
||||
fn fail_on_native() -> u64;
|
||||
fn fail_on_wasm() -> u64;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -327,6 +331,13 @@ cfg_if! {
|
||||
fn function_signature_changed() -> u64 {
|
||||
1
|
||||
}
|
||||
|
||||
fn fail_on_native() -> u64 {
|
||||
panic!("Failing because we are on native")
|
||||
}
|
||||
fn fail_on_wasm() -> u64 {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
impl consensus_aura::AuraApi<Block> for Runtime {
|
||||
@@ -414,6 +425,14 @@ cfg_if! {
|
||||
vec.push(2);
|
||||
vec
|
||||
}
|
||||
|
||||
fn fail_on_native() -> u64 {
|
||||
1
|
||||
}
|
||||
|
||||
fn fail_on_wasm() -> u64 {
|
||||
panic!("Failing because we are on wasm")
|
||||
}
|
||||
}
|
||||
|
||||
impl consensus_aura::AuraApi<Block> for Runtime {
|
||||
|
||||
Reference in New Issue
Block a user