proper executor/block type for benchmarks and try-runtime (#2771)

* proper executor/block type for benchmarks and try-runtime

* Fix

* update benches as well to latest work

* Remvoe dbg
This commit is contained in:
Kian Paimani
2021-03-31 20:40:15 +02:00
committed by GitHub
parent e65cad69ec
commit c56f9e0514
2 changed files with 67 additions and 20 deletions
+12
View File
@@ -160,6 +160,12 @@ pub trait IdentifyVariant {
/// Returns if this is a configuration for the `Rococo` network.
fn is_rococo(&self) -> bool;
/// Returns if this is a configuration for the `Polkadot` network.
fn is_polkadot(&self) -> bool;
/// Returns true if this configuration is for a development network.
fn is_dev(&self) -> bool;
}
impl IdentifyVariant for Box<dyn ChainSpec> {
@@ -172,6 +178,12 @@ impl IdentifyVariant for Box<dyn ChainSpec> {
fn is_rococo(&self) -> bool {
self.id().starts_with("rococo") || self.id().starts_with("rco")
}
fn is_polkadot(&self) -> bool {
self.id().starts_with("polkadot") || self.id().starts_with("dot")
}
fn is_dev(&self) -> bool {
self.id().ends_with("dev")
}
}
// If we're using prometheus, use a registry with a prefix of `polkadot`.