Companion PR for 5657 (#1003)

* prometheus registry to txpool

* Fix network tests

* Use None as the network config path

* update substrate

Co-authored-by: Ashley Ruglys <ashley.ruglys@gmail.com>
Co-authored-by: Bastian Köcher <git@kchr.de>
This commit is contained in:
Nikolay Volf
2020-04-17 18:29:33 +03:00
committed by GitHub
parent abd2650a58
commit 39e8013490
3 changed files with 131 additions and 131 deletions
+4 -4
View File
@@ -158,9 +158,9 @@ macro_rules! new_full_start {
.with_select_chain(|_, backend| {
Ok(sc_client::LongestChain::new(backend.clone()))
})?
.with_transaction_pool(|config, client, _fetcher| {
.with_transaction_pool(|config, client, _fetcher, prometheus_registry| {
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
let pool = sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api));
let pool = sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry);
Ok(pool)
})?
.with_import_queue(|config, client, mut select_chain, _| {
@@ -702,12 +702,12 @@ where
.with_select_chain(|_, backend| {
Ok(LongestChain::new(backend.clone()))
})?
.with_transaction_pool(|config, client, fetcher| {
.with_transaction_pool(|config, client, fetcher, prometheus_registry| {
let fetcher = fetcher
.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, Arc::new(pool_api), sc_transaction_pool::RevalidationType::Light,
config, Arc::new(pool_api), prometheus_registry, sc_transaction_pool::RevalidationType::Light,
);
Ok(pool)
})?