mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-30 03:31:05 +00:00
Meter block import results via prometheus (#6025)
This commit is contained in:
committed by
GitHub
parent
302c543b49
commit
efc4849f1a
@@ -22,19 +22,20 @@ parking_lot = "0.10.0"
|
||||
serde = { version = "1.0", features=["derive"] }
|
||||
assert_matches = "1.3.0"
|
||||
|
||||
sc-client-api = { path = "../../../client/api" , version = "2.0.0-dev"}
|
||||
sc-transaction-pool = { path = "../../transaction-pool" , version = "2.0.0-dev"}
|
||||
sp-blockchain = { path = "../../../primitives/blockchain" , version = "2.0.0-dev"}
|
||||
sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common" , version = "0.8.0-dev"}
|
||||
sp-inherents = { path = "../../../primitives/inherents" , version = "2.0.0-dev"}
|
||||
sp-runtime = { path = "../../../primitives/runtime" , version = "2.0.0-dev"}
|
||||
sp-core = { path = "../../../primitives/core" , version = "2.0.0-dev"}
|
||||
sp-transaction-pool = { path = "../../../primitives/transaction-pool" , version = "2.0.0-dev"}
|
||||
sc-client-api = { path = "../../../client/api", version = "2.0.0-dev" }
|
||||
sc-transaction-pool = { path = "../../transaction-pool", version = "2.0.0-dev" }
|
||||
sp-blockchain = { path = "../../../primitives/blockchain", version = "2.0.0-dev" }
|
||||
sp-consensus = { package = "sp-consensus", path = "../../../primitives/consensus/common", version = "0.8.0-dev" }
|
||||
sp-inherents = { path = "../../../primitives/inherents", version = "2.0.0-dev" }
|
||||
sp-runtime = { path = "../../../primitives/runtime", version = "2.0.0-dev" }
|
||||
sp-core = { path = "../../../primitives/core", version = "2.0.0-dev" }
|
||||
sp-transaction-pool = { path = "../../../primitives/transaction-pool", version = "2.0.0-dev" }
|
||||
prometheus-endpoint = { package = "substrate-prometheus-endpoint", path = "../../../utils/prometheus", version = "0.8.0-dev" }
|
||||
|
||||
[dev-dependencies]
|
||||
sc-basic-authorship = { path = "../../basic-authorship" , version = "0.8.0-dev"}
|
||||
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client" , version = "2.0.0-dev"}
|
||||
substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool" , version = "2.0.0-dev"}
|
||||
sc-basic-authorship = { path = "../../basic-authorship", version = "0.8.0-dev" }
|
||||
substrate-test-runtime-client = { path = "../../../test-utils/runtime/client", version = "2.0.0-dev" }
|
||||
substrate-test-runtime-transaction-pool = { path = "../../../test-utils/runtime/transaction-pool", version = "2.0.0-dev" }
|
||||
tokio = { version = "0.2", features = ["rt-core", "macros"] }
|
||||
env_logger = "0.7.0"
|
||||
tempfile = "3.1.0"
|
||||
|
||||
@@ -29,6 +29,7 @@ use sp_runtime::{traits::Block as BlockT, Justification};
|
||||
use sc_client_api::backend::{Backend as ClientBackend, Finalizer};
|
||||
use sc_transaction_pool::txpool;
|
||||
use std::{sync::Arc, marker::PhantomData};
|
||||
use prometheus_endpoint::Registry;
|
||||
|
||||
mod error;
|
||||
mod finalize_block;
|
||||
@@ -69,6 +70,7 @@ impl<B: BlockT> Verifier<B> for ManualSealVerifier {
|
||||
pub fn import_queue<Block, Transaction>(
|
||||
block_import: BoxBlockImport<Block, Transaction>,
|
||||
spawner: &impl sp_core::traits::SpawnBlocking,
|
||||
registry: Option<&Registry>,
|
||||
) -> BasicQueue<Block, Transaction>
|
||||
where
|
||||
Block: BlockT,
|
||||
@@ -80,6 +82,7 @@ pub fn import_queue<Block, Transaction>(
|
||||
None,
|
||||
None,
|
||||
spawner,
|
||||
registry,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user