Cleanup transaction pool deps (#4782)

* Cleanup transaction pool deps

* Fix it properly

* Fix doc test
This commit is contained in:
Bastian Köcher
2020-01-31 12:40:32 +01:00
committed by GitHub
parent ce47bfa2ba
commit 709a899f9d
19 changed files with 140 additions and 69 deletions
+2 -2
View File
@@ -63,7 +63,7 @@ macro_rules! new_full_start {
})?
.with_transaction_pool(|config, client, _fetcher| {
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
let pool = sc_transaction_pool::BasicPool::new(config, pool_api);
let pool = sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api));
Ok(pool)
})?
.with_import_queue(|_config, client, mut select_chain, _transaction_pool| {
@@ -313,7 +313,7 @@ pub fn new_light(config: NodeConfiguration)
.ok_or_else(|| "Trying to start light transaction pool without active fetcher")?;
let pool_api = sc_transaction_pool::LightChainApi::new(client.clone(), fetcher.clone());
let pool = sc_transaction_pool::BasicPool::with_revalidation_type(
config, pool_api, sc_transaction_pool::RevalidationType::Light,
config, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light,
);
Ok(pool)
})?