Companion PR for 'Make choosing an executor an explicit part of service construction' (#9525) (#3615)

* Companion PR

* Update a few files

* Run cargo fmt

* Do better at renaming things

* More renamings

* More fixes

* oops

* Fix simnet problems

* fix compilation

* Update substrate

Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Ashley
2021-08-18 15:26:30 +02:00
committed by GitHub
parent e3eb5fda68
commit d88dec65fb
9 changed files with 277 additions and 237 deletions
+5 -5
View File
@@ -54,11 +54,11 @@ use substrate_test_client::{
BlockchainEventsExt, RpcHandlersExt, RpcTransactionError, RpcTransactionOutput,
};
/// Declare an instance of the native executor named `PolkadotTestExecutor`. Include the wasm binary as the
/// Declare an instance of the native executor named `PolkadotTestExecutorDispatch`. Include the wasm binary as the
/// equivalent wasm code.
pub struct PolkadotTestExecutor;
pub struct PolkadotTestExecutorDispatch;
impl sc_executor::NativeExecutionDispatch for PolkadotTestExecutor {
impl sc_executor::NativeExecutionDispatch for PolkadotTestExecutorDispatch {
type ExtendHostFunctions = frame_benchmarking::benchmarking::HostFunctions;
fn dispatch(method: &str, data: &[u8]) -> Option<Vec<u8>> {
@@ -71,7 +71,7 @@ impl sc_executor::NativeExecutionDispatch for PolkadotTestExecutor {
}
/// The client type being used by the test service.
pub type Client = FullClient<polkadot_test_runtime::RuntimeApi, PolkadotTestExecutor>;
pub type Client = FullClient<polkadot_test_runtime::RuntimeApi, PolkadotTestExecutorDispatch>;
pub use polkadot_service::FullBackend;
@@ -82,7 +82,7 @@ pub fn new_full(
is_collator: IsCollator,
worker_program_path: Option<PathBuf>,
) -> Result<NewFull<Arc<Client>>, Error> {
polkadot_service::new_full::<polkadot_test_runtime::RuntimeApi, PolkadotTestExecutor, _>(
polkadot_service::new_full::<polkadot_test_runtime::RuntimeApi, PolkadotTestExecutorDispatch, _>(
config,
is_collator,
None,