mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-31 15:41:02 +00:00
do not start spec_version guard when version mode is set to auto (#1278)
This commit is contained in:
committed by
Bastian Köcher
parent
a7fa7a491f
commit
c4837d2368
@@ -528,6 +528,16 @@ macro_rules! declare_chain_options {
|
||||
}
|
||||
|
||||
impl [<$chain ConnectionParams>] {
|
||||
/// Returns `true` if version guard can be started.
|
||||
///
|
||||
/// There's no reason to run version guard when version mode is set to `Auto`. It can
|
||||
/// lead to relay shutdown when chain is upgraded, even though we have explicitly
|
||||
/// said that we don't want to shutdown.
|
||||
#[allow(dead_code)]
|
||||
pub fn can_start_version_guard(&self) -> bool {
|
||||
self.[<$chain_prefix _runtime_version>].[<$chain_prefix _version_mode>] != RuntimeVersionType::Auto
|
||||
}
|
||||
|
||||
/// Convert connection params into Substrate client.
|
||||
pub async fn to_client<Chain: CliChain>(
|
||||
&self,
|
||||
|
||||
Reference in New Issue
Block a user