mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 22:47:56 +00:00
Fast sync child trie support. (#9239)
* state machine proofs. * initial implementation * Remove todo. * Extend test and fix import. * fix no proof, with proof ko. * fix start at logic. * Restore response size. * Rework comments. * Add explicit ref * Use compact proof. * ref change * elaborato on empty change set condition. * KeyValueState renaming. * Do not add two time child trie with same root to sync reply. * rust format * Fix merge. * fix warnings and fmt * fmt * update protocol id to V2
This commit is contained in:
@@ -697,6 +697,8 @@ pub struct FullPeerConfig {
|
||||
pub is_authority: bool,
|
||||
/// Syncing mode
|
||||
pub sync_mode: SyncMode,
|
||||
/// Extra genesis storage.
|
||||
pub extra_storage: Option<sp_core::storage::Storage>,
|
||||
/// Enable transaction indexing.
|
||||
pub storage_chain: bool,
|
||||
}
|
||||
@@ -765,6 +767,11 @@ where
|
||||
(Some(keep_blocks), false) => TestClientBuilder::with_pruning_window(keep_blocks),
|
||||
(None, false) => TestClientBuilder::with_default_backend(),
|
||||
};
|
||||
if let Some(storage) = config.extra_storage {
|
||||
let genesis_extra_storage = test_client_builder.genesis_init_mut().extra_storage();
|
||||
*genesis_extra_storage = storage;
|
||||
}
|
||||
|
||||
if matches!(config.sync_mode, SyncMode::Fast { .. } | SyncMode::Warp) {
|
||||
test_client_builder = test_client_builder.set_no_genesis();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user