move Metrics to utils (#1765)

This commit is contained in:
Andronik Ordian
2020-09-29 13:42:20 +02:00
committed by GitHub
parent 5d4eb6bdce
commit de05bec4d6
29 changed files with 99 additions and 120 deletions
@@ -12,6 +12,7 @@ sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "mas
polkadot-primitives = { path = "../../../primitives" }
polkadot-node-primitives = { path = "../../primitives" }
polkadot-subsystem = { package = "polkadot-node-subsystem", path = "../../subsystem" }
polkadot-node-subsystem-util = { path = "../../subsystem-util" }
[dev-dependencies]
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master" }
+6 -6
View File
@@ -22,12 +22,14 @@
use polkadot_subsystem::{
Subsystem, SpawnedSubsystem, SubsystemResult, SubsystemContext,
FromOverseer, OverseerSignal,
messages::{
RuntimeApiMessage, RuntimeApiRequest as Request,
},
errors::RuntimeApiError,
};
use polkadot_node_subsystem_util::{
metrics::{self, prometheus},
};
use polkadot_subsystem::messages::{
RuntimeApiMessage, RuntimeApiRequest as Request,
};
use polkadot_subsystem::errors::RuntimeApiError;
use polkadot_primitives::v1::{Block, BlockId, Hash, ParachainHost};
use sp_api::{ProvideRuntimeApi};
@@ -52,8 +54,6 @@ impl<Client, Context> Subsystem<Context> for RuntimeApiSubsystem<Client> where
Client::Api: ParachainHost<Block>,
Context: SubsystemContext<Message = RuntimeApiMessage>
{
type Metrics = Metrics;
fn start(self, ctx: Context) -> SpawnedSubsystem {
SpawnedSubsystem {
future: run(ctx, self).map(|_| ()).boxed(),