mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
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:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user