Unify SyncMode data structures under one (#14465)

This commit is contained in:
Nazar Mokrynskyi
2023-06-29 18:25:41 +03:00
committed by GitHub
parent f1c16d05e7
commit ff7e8b6b17
10 changed files with 50 additions and 152 deletions
+1 -1
View File
@@ -770,7 +770,7 @@ where
*genesis_extra_storage = storage;
}
if matches!(config.sync_mode, SyncMode::Fast { .. } | SyncMode::Warp) {
if matches!(config.sync_mode, SyncMode::LightState { .. } | SyncMode::Warp) {
test_client_builder = test_client_builder.set_no_genesis();
}
let backend = test_client_builder.backend();
+2 -2
View File
@@ -1132,7 +1132,7 @@ async fn syncs_state() {
let mut config_two = FullPeerConfig::default();
config_two.extra_storage = Some(genesis_storage);
config_two.sync_mode =
SyncMode::Fast { skip_proofs: *skip_proofs, storage_chain_mode: false };
SyncMode::LightState { skip_proofs: *skip_proofs, storage_chain_mode: false };
net.add_full_peer_with_config(config_two);
let hashes = net.peer(0).push_blocks(64, false);
// Wait for peer 1 to sync header chain.
@@ -1175,7 +1175,7 @@ async fn syncs_indexed_blocks() {
net.add_full_peer_with_config(FullPeerConfig { storage_chain: true, ..Default::default() });
net.add_full_peer_with_config(FullPeerConfig {
storage_chain: true,
sync_mode: SyncMode::Fast { skip_proofs: false, storage_chain_mode: true },
sync_mode: SyncMode::LightState { skip_proofs: false, storage_chain_mode: true },
..Default::default()
});
net.peer(0).generate_blocks_at(