move Metrics to utils (#1765)

This commit is contained in:
Andronik Ordian authored and GitHub committed 2020-09-29 11:42:20 +00:00
1 parent 5d4eb6bdce
commit de05bec4d6
29 files changed
+99 -120

No files matched your search

+1
View File
@@ -9,6 +9,7 @@ futures = { version = "0.3.5" }
sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "master" }
polkadot-primitives = { path = "../../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
[dev-dependencies]
futures = { version = "0.3.5", features = ["thread-pool"] }
+2 -2
View File
@@ -30,6 +30,8 @@ use polkadot_subsystem::{
FromOverseer, OverseerSignal,
SpawnedSubsystem, Subsystem, SubsystemResult, SubsystemContext,
messages::ChainApiMessage,
};
use polkadot_node_subsystem_util::{
metrics::{self, prometheus},
};
use polkadot_primitives::v1::{Block, BlockId};
@@ -57,8 +59,6 @@ impl<Client, Context> Subsystem<Context> for ChainApiSubsystem<Client> where
Client: HeaderBackend<Block> + 'static,
Context: SubsystemContext<Message = ChainApiMessage>
{
type Metrics = Metrics;
fn start(self, ctx: Context) -> SpawnedSubsystem {
SpawnedSubsystem {
future: run(ctx, self).map(|_| ()).boxed(),