Unverified Commit e44fbabb authored by Nikolay Volf's avatar Nikolay Volf Committed by GitHub
Browse files

Companion PR for 5657 (#1003)



* prometheus registry to txpool

* Fix network tests

* Use None as the network config path

* update substrate

Co-authored-by: default avatarAshley Ruglys <ashley.ruglys@gmail.com>
Co-authored-by: Bastian Köcher's avatarBastian Köcher <git@kchr.de>
parent fff1db99
Pipeline #88449 passed with stages
in 27 minutes and 52 seconds
This diff is collapsed.
......@@ -574,7 +574,7 @@ pub trait TestNetFactory: Sized {
"test-node",
"test-client",
Default::default(),
&std::env::current_dir().expect("current directory must exist"),
None,
);
network_config.listen_addresses = vec![listen_addr.clone()];
network_config.transport = TransportConfig::MemoryOnly;
......@@ -649,7 +649,7 @@ pub trait TestNetFactory: Sized {
"test-node",
"test-client",
Default::default(),
&std::env::current_dir().expect("current directory must exist"),
None,
);
network_config.listen_addresses = vec![listen_addr.clone()];
network_config.transport = TransportConfig::MemoryOnly;
......
......@@ -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)
})?
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment