mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 20:31:13 +00:00
Allow node to add externalities extensions (#4583)
* allow extensions to be extensible from the outside
This commit is contained in:
committed by
GitHub
parent
426c157076
commit
5946d6f7a0
@@ -22,6 +22,7 @@ use sc_client_api::{
|
||||
self,
|
||||
BlockchainEvents,
|
||||
backend::RemoteBackend, light::RemoteBlockchain,
|
||||
execution_extensions::ExtensionsFactory,
|
||||
};
|
||||
use sc_client::Client;
|
||||
use sc_chain_spec::{RuntimeGenesis, Extension};
|
||||
@@ -746,6 +747,13 @@ ServiceBuilder<
|
||||
+ TransactionPoolMaintainer<Block=TBl, Hash = <TBl as BlockT>::Hash>,
|
||||
TRpc: sc_rpc::RpcExtension<sc_rpc::Metadata> + Clone,
|
||||
{
|
||||
|
||||
/// Set an ExecutionExtensionsFactory
|
||||
pub fn with_execution_extensions_factory(self, execution_extensions_factory: Box<dyn ExtensionsFactory>) -> Result<Self, Error> {
|
||||
self.client.execution_extensions().set_extensions_factory(execution_extensions_factory);
|
||||
Ok(self)
|
||||
}
|
||||
|
||||
/// Builds the service.
|
||||
pub fn build(self) -> Result<Service<
|
||||
TBl,
|
||||
|
||||
Reference in New Issue
Block a user