Various small improvements to service construction. (#6738)

* Remove service components and add build_network, build_offchain_workers etc

* Improve transaction pool api

* Remove commented out line

* Add PartialComponents

* Add BuildNetworkParams, documentation

* Remove unused imports in tests

* Apply suggestions from code review

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>

* Remove unused imports in node-bench

Co-authored-by: Nikolay Volf <nikvolf@gmail.com>
This commit is contained in:
Ashley
2020-07-28 15:21:33 +02:00
committed by GitHub
parent 97f400f0f0
commit 9220b646d2
17 changed files with 401 additions and 326 deletions
@@ -326,7 +326,7 @@ mod tests {
prelude::*, TestClientBuilder, runtime::{Extrinsic, Transfer}, TestClientBuilderExt,
};
use sp_transaction_pool::{ChainEvent, MaintainedTransactionPool, TransactionSource};
use sc_transaction_pool::{BasicPool, FullChainApi};
use sc_transaction_pool::BasicPool;
use sp_api::Core;
use sp_blockchain::HeaderBackend;
use sp_runtime::traits::NumberFor;
@@ -361,7 +361,6 @@ mod tests {
let spawner = sp_core::testing::TaskExecutor::new();
let txpool = BasicPool::new_full(
Default::default(),
Arc::new(FullChainApi::new(client.clone(), None)),
None,
spawner,
client.clone(),
@@ -415,7 +414,6 @@ mod tests {
let spawner = sp_core::testing::TaskExecutor::new();
let txpool = BasicPool::new_full(
Default::default(),
Arc::new(FullChainApi::new(client.clone(), None)),
None,
spawner,
client.clone(),
@@ -451,7 +449,6 @@ mod tests {
let spawner = sp_core::testing::TaskExecutor::new();
let txpool = BasicPool::new_full(
Default::default(),
Arc::new(FullChainApi::new(client.clone(), None)),
None,
spawner,
client.clone(),
@@ -514,7 +511,6 @@ mod tests {
let spawner = sp_core::testing::TaskExecutor::new();
let txpool = BasicPool::new_full(
Default::default(),
Arc::new(FullChainApi::new(client.clone(), None)),
None,
spawner,
client.clone(),