light client impls

This commit is contained in:
Tadeo hepperle
2024-02-20 19:44:10 +01:00
parent 451d37b35f
commit 9e58423ab7
2 changed files with 10 additions and 1 deletions
+10
View File
@@ -20,6 +20,7 @@ use crate::{
tx::TxClient,
OnlineClient,
};
use super::BaseClient;
pub use builder::{LightClientBuilder, RawLightClientBuilder};
use derivative::Derivative;
use subxt_lightclient::LightClientRpcError;
@@ -132,6 +133,11 @@ impl<T: Config> LightClient<T> {
self.client.runtime_version()
}
/// Return the inner [`BaseClient`].
pub fn base_client(&self) -> BaseClient<T> {
self.client.base_client()
}
/// Work with transactions.
pub fn tx(&self) -> TxClient<T, Self> {
<Self as OfflineClientT<T>>::tx(self)
@@ -191,4 +197,8 @@ impl<T: Config> OfflineClientT<T> for LightClient<T> {
fn runtime_version(&self) -> crate::backend::RuntimeVersion {
self.runtime_version()
}
fn base_client(&self) -> BaseClient<T> {
self.base_client()
}
}
-1
View File
@@ -358,7 +358,6 @@ impl<T: Config> OfflineClientT<T> for OnlineClient<T> {
fn runtime_version(&self) -> RuntimeVersion {
self.runtime_version()
}
fn base_client(&self) -> BaseClient<T> {
self.base_client()
}