diff --git a/substrate/client/service/src/builder.rs b/substrate/client/service/src/builder.rs index 5237a6166b012ed6446b1751238698158dc48d43..fe71e11945bb2c20b8a8e40a880dda2f0096e9c0 100644 --- a/substrate/client/service/src/builder.rs +++ b/substrate/client/service/src/builder.rs @@ -749,6 +749,7 @@ pub struct BuildNetworkParams<'a, TBl: BlockT, TExPool, TImpQu, TCl> { /// Optional warp sync params. pub warp_sync_params: Option<WarpSyncParams<TBl>>, } + /// Build the network service, the network status sinks and an RPC sender. pub fn build_network<TBl, TExPool, TImpQu, TCl>( params: BuildNetworkParams<TBl, TExPool, TImpQu, TCl>, diff --git a/substrate/client/service/src/lib.rs b/substrate/client/service/src/lib.rs index e658c7f7d9c710f61e3e63e60e351aa819a8f3e5..4a896ecc87263f6fd477e40bac5eefc5123a723e 100644 --- a/substrate/client/service/src/lib.rs +++ b/substrate/client/service/src/lib.rs @@ -211,7 +211,7 @@ async fn build_network_future< } /// Builds a future that processes system RPC requests. -async fn build_system_rpc_future< +pub async fn build_system_rpc_future< B: BlockT, C: BlockchainEvents<B> + HeaderBackend<B> @@ -421,6 +421,13 @@ pub struct TransactionPoolAdapter<C, P> { client: Arc<C>, } +impl<C, P> TransactionPoolAdapter<C, P> { + /// Constructs a new instance of [`TransactionPoolAdapter`]. + pub fn new(pool: Arc<P>, client: Arc<C>) -> Self { + Self { pool, client } + } +} + /// Get transactions for propagation. /// /// Function extracted to simplify the test and prevent creating `ServiceFactory`.