mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 07:11:03 +00:00
and backend reference to rpc builder (#3979)
This commit is contained in:
committed by
Gavin Wood
parent
eb3c950cfe
commit
363c8989d4
@@ -568,10 +568,10 @@ impl<TBl, TRtApi, TCfg, TGen, TCSExt, TCl, TFchr, TSc, TImpQu, TFprb, TFpp, TNet
|
||||
/// Defines the RPC extensions to use.
|
||||
pub fn with_rpc_extensions<URpc>(
|
||||
self,
|
||||
rpc_ext_builder: impl FnOnce(Arc<TCl>, Arc<TExPool>) -> URpc
|
||||
rpc_ext_builder: impl FnOnce(Arc<TCl>, Arc<TExPool>, Arc<Backend>) -> URpc
|
||||
) -> Result<ServiceBuilder<TBl, TRtApi, TCfg, TGen, TCSExt, TCl, TFchr, TSc, TImpQu, TFprb, TFpp,
|
||||
TNetP, TExPool, URpc, Backend>, Error> {
|
||||
let rpc_extensions = rpc_ext_builder(self.client.clone(), self.transaction_pool.clone());
|
||||
let rpc_extensions = rpc_ext_builder(self.client.clone(), self.transaction_pool.clone(), self.backend.clone());
|
||||
|
||||
Ok(ServiceBuilder {
|
||||
config: self.config,
|
||||
|
||||
@@ -96,7 +96,7 @@ macro_rules! new_full_start {
|
||||
import_setup = Some((block_import, grandpa_link, babe_link));
|
||||
Ok(import_queue)
|
||||
})?
|
||||
.with_rpc_extensions(|client, pool| -> RpcExtension {
|
||||
.with_rpc_extensions(|client, pool, _backend| -> RpcExtension {
|
||||
node_rpc::create(client, pool)
|
||||
})?;
|
||||
|
||||
@@ -326,7 +326,7 @@ pub fn new_light<C: Send + Default + 'static>(config: NodeConfiguration<C>)
|
||||
.with_finality_proof_provider(|client, backend|
|
||||
Ok(Arc::new(GrandpaFinalityProofProvider::new(backend, client)) as _)
|
||||
)?
|
||||
.with_rpc_extensions(|client, pool| -> RpcExtension {
|
||||
.with_rpc_extensions(|client, pool, _backend| -> RpcExtension {
|
||||
node_rpc::create(client, pool)
|
||||
})?
|
||||
.build()?;
|
||||
|
||||
Reference in New Issue
Block a user