mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 20:27:58 +00:00
Meter block import results via prometheus (#6025)
This commit is contained in:
committed by
GitHub
parent
302c543b49
commit
efc4849f1a
@@ -43,7 +43,14 @@ macro_rules! new_full_start {
|
||||
let pool_api = sc_transaction_pool::FullChainApi::new(client.clone());
|
||||
Ok(sc_transaction_pool::BasicPool::new(config, std::sync::Arc::new(pool_api), prometheus_registry))
|
||||
})?
|
||||
.with_import_queue(|_config, client, mut select_chain, _transaction_pool, spawn_task_handle| {
|
||||
.with_import_queue(|
|
||||
_config,
|
||||
client,
|
||||
mut select_chain,
|
||||
_transaction_pool,
|
||||
spawn_task_handle,
|
||||
registry,
|
||||
| {
|
||||
let select_chain = select_chain.take()
|
||||
.ok_or_else(|| sc_service::Error::SelectChainRequired)?;
|
||||
|
||||
@@ -65,6 +72,7 @@ macro_rules! new_full_start {
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawn_task_handle,
|
||||
registry,
|
||||
)?;
|
||||
|
||||
import_setup = Some((grandpa_block_import, grandpa_link));
|
||||
@@ -198,7 +206,16 @@ pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceE
|
||||
);
|
||||
Ok(pool)
|
||||
})?
|
||||
.with_import_queue_and_fprb(|_config, client, backend, fetcher, _select_chain, _tx_pool, spawn_task_handle| {
|
||||
.with_import_queue_and_fprb(|
|
||||
_config,
|
||||
client,
|
||||
backend,
|
||||
fetcher,
|
||||
_select_chain,
|
||||
_tx_pool,
|
||||
spawn_task_handle,
|
||||
prometheus_registry,
|
||||
| {
|
||||
let fetch_checker = fetcher
|
||||
.map(|fetcher| fetcher.checker().clone())
|
||||
.ok_or_else(|| "Trying to start light import queue without active fetch checker")?;
|
||||
@@ -220,6 +237,7 @@ pub fn new_light(config: Configuration) -> Result<impl AbstractService, ServiceE
|
||||
client,
|
||||
inherent_data_providers.clone(),
|
||||
spawn_task_handle,
|
||||
prometheus_registry,
|
||||
)?;
|
||||
|
||||
Ok((import_queue, finality_proof_request_builder))
|
||||
|
||||
Reference in New Issue
Block a user