Skip to content
Snippets Groups Projects

Refactor node implementation

Merged Benjamin Gallois requested to merge 216-refactor-node into master
Files
3
+ 12
14
@@ -146,11 +146,11 @@ impl<Api> RuntimeApiCollection for Api where
#[derive(Clone)]
pub enum Client {
#[cfg(feature = "g1")]
G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::g1_executor::G1Executor>>),
G1(Arc<super::FullClient<g1_runtime::RuntimeApi, super::runtime_executor::Executor>>),
#[cfg(feature = "gtest")]
GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi, super::gtest_executor::GTestExecutor>>),
GTest(Arc<super::FullClient<gtest_runtime::RuntimeApi, super::runtime_executor::Executor>>),
#[cfg(feature = "gdev")]
GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi, super::gdev_executor::GDevExecutor>>),
GDev(Arc<super::FullClient<gdev_runtime::RuntimeApi, super::runtime_executor::Executor>>),
}
macro_rules! with_client {
@@ -197,23 +197,23 @@ impl ClientHandle for Client {
}
#[cfg(feature = "g1")]
impl From<Arc<super::FullClient<g1_runtime::RuntimeApi, super::g1_executor::G1Executor>>>
impl From<Arc<super::FullClient<g1_runtime::RuntimeApi, super::runtime_executor::Executor>>>
for Client
{
fn from(
client: Arc<super::FullClient<g1_runtime::RuntimeApi, super::g1_executor::G1Executor>>,
client: Arc<super::FullClient<g1_runtime::RuntimeApi, super::runtime_executor::Executor>>,
) -> Self {
Self::G1(client)
}
}
#[cfg(feature = "gtest")]
impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi, super::gtest_executor::GTestExecutor>>>
impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi, super::runtime_executor::Executor>>>
for Client
{
fn from(
client: Arc<
super::FullClient<gtest_runtime::RuntimeApi, super::gtest_executor::GTestExecutor>,
super::FullClient<gtest_runtime::RuntimeApi, super::runtime_executor::Executor>,
>,
) -> Self {
Self::GTest(client)
@@ -221,13 +221,11 @@ impl From<Arc<super::FullClient<gtest_runtime::RuntimeApi, super::gtest_executor
}
#[cfg(feature = "gdev")]
impl From<Arc<super::FullClient<gdev_runtime::RuntimeApi, super::gdev_executor::GDevExecutor>>>
impl From<Arc<super::FullClient<gdev_runtime::RuntimeApi, super::runtime_executor::Executor>>>
for Client
{
fn from(
client: Arc<
super::FullClient<gdev_runtime::RuntimeApi, super::gdev_executor::GDevExecutor>,
>,
client: Arc<super::FullClient<gdev_runtime::RuntimeApi, super::runtime_executor::Executor>>,
) -> Self {
Self::GDev(client)
}
@@ -328,15 +326,15 @@ trait BenchmarkCallSigner<RuntimeCall: Encode + Clone, Signer: Pair> {
#[cfg(feature = "g1")]
use g1_runtime as runtime;
#[cfg(feature = "g1")]
type FullClient = super::FullClient<runtime::RuntimeApi, super::g1_executor::G1Executor>;
type FullClient = super::FullClient<runtime::RuntimeApi, super::runtime_executor::Executor>;
#[cfg(feature = "gdev")]
use gdev_runtime as runtime;
#[cfg(feature = "gdev")]
type FullClient = super::FullClient<runtime::RuntimeApi, super::gdev_executor::GDevExecutor>;
type FullClient = super::FullClient<runtime::RuntimeApi, super::runtime_executor::Executor>;
#[cfg(feature = "gtest")]
use gtest_runtime as runtime;
#[cfg(feature = "gtest")]
type FullClient = super::FullClient<runtime::RuntimeApi, super::gtest_executor::GTestExecutor>;
type FullClient = super::FullClient<runtime::RuntimeApi, super::runtime_executor::Executor>;
#[cfg(any(feature = "gdev", feature = "gtest"))]
impl BenchmarkCallSigner<runtime::RuntimeCall, sp_core::sr25519::Pair> for FullClient {
Loading