mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 22:51:13 +00:00
Unify SyncMode data structures under one (#14465)
This commit is contained in:
@@ -226,7 +226,7 @@ where
|
||||
wasm_runtime_overrides: config.wasm_runtime_overrides.clone(),
|
||||
no_genesis: matches!(
|
||||
config.network.sync_mode,
|
||||
SyncMode::Fast { .. } | SyncMode::Warp { .. }
|
||||
SyncMode::LightState { .. } | SyncMode::Warp { .. }
|
||||
),
|
||||
wasm_runtime_substitutes,
|
||||
},
|
||||
@@ -794,7 +794,8 @@ where
|
||||
|
||||
if client.requires_full_sync() {
|
||||
match config.network.sync_mode {
|
||||
SyncMode::Fast { .. } => return Err("Fast sync doesn't work for archive nodes".into()),
|
||||
SyncMode::LightState { .. } =>
|
||||
return Err("Fast sync doesn't work for archive nodes".into()),
|
||||
SyncMode::Warp => return Err("Warp sync doesn't work for archive nodes".into()),
|
||||
SyncMode::Full => {},
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ impl Configuration {
|
||||
/// Returns true if the genesis state writting will be skipped while initializing the genesis
|
||||
/// block.
|
||||
pub fn no_genesis(&self) -> bool {
|
||||
matches!(self.network.sync_mode, SyncMode::Fast { .. } | SyncMode::Warp { .. })
|
||||
matches!(self.network.sync_mode, SyncMode::LightState { .. } | SyncMode::Warp { .. })
|
||||
}
|
||||
|
||||
/// Returns the database config for creating the backend.
|
||||
|
||||
Reference in New Issue
Block a user