mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 08:07:58 +00:00
Offchain execution extensions (#4145)
* Pass Extensions instead of individual objects. * Move TransactionPool to a separate ExternalitiesExtension. * Fix compilation.? * Clean up. * Refactor testing utilities. * Add docs, fix tests. * Fix doctest. * Fix formatting and add some logs. * Add some docs. * Remove unused files.
This commit is contained in:
committed by
Gavin Wood
parent
f000392cc0
commit
86b6ac5571
@@ -20,7 +20,8 @@
|
||||
|
||||
pub mod client_ext;
|
||||
|
||||
pub use client::{ExecutionStrategies, blockchain, self};
|
||||
pub use client::{blockchain, self};
|
||||
pub use client_api::execution_extensions::{ExecutionStrategies, ExecutionExtensions};
|
||||
pub use client_db::{Backend, self};
|
||||
pub use client_ext::ClientExt;
|
||||
pub use consensus;
|
||||
@@ -194,7 +195,10 @@ impl<Executor, Backend, G: GenesisInit> TestClientBuilder<Executor, Backend, G>
|
||||
executor,
|
||||
storage,
|
||||
Default::default(),
|
||||
self.execution_strategies,
|
||||
ExecutionExtensions::new(
|
||||
self.execution_strategies,
|
||||
self.keystore.clone(),
|
||||
)
|
||||
).expect("Creates new client");
|
||||
|
||||
let longest_chain = client::LongestChain::new(self.backend);
|
||||
@@ -210,7 +214,7 @@ impl<E, Backend, G: GenesisInit> TestClientBuilder<
|
||||
> {
|
||||
/// Build the test client with the given native executor.
|
||||
pub fn build_with_native_executor<Block, RuntimeApi, I>(
|
||||
mut self,
|
||||
self,
|
||||
executor: I,
|
||||
) -> (
|
||||
client::Client<
|
||||
@@ -229,7 +233,7 @@ impl<E, Backend, G: GenesisInit> TestClientBuilder<
|
||||
let executor = executor.into().unwrap_or_else(||
|
||||
NativeExecutor::new(WasmExecutionMethod::Interpreted, None)
|
||||
);
|
||||
let executor = LocalCallExecutor::new(self.backend.clone(), executor, self.keystore.take());
|
||||
let executor = LocalCallExecutor::new(self.backend.clone(), executor);
|
||||
|
||||
self.build_with_executor(executor)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user