mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 12:37:57 +00:00
Add a LightSyncState field to the chain spec (#6894)
* Reset code, almost ready for PR * Improved build_hardcoded_spec * Fix line widths * Fix tests * Fix sc-service-test * Suggestions from code review * Rename to LightSyncState * It's not syncing :^( * It syncs! * Remove rpc call * Convert spaces to tabs * Moved sc-service things to export_sync_state.rs * Fix tests * Wait for syncing with network_status_sinks * Remove sc-network from node-template * Apply suggestions from code review Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Various changes, split the flag up into 2 pieces to make testing easier. * Update client/cli/src/commands/build_spec_cmd.rs Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> * Revert a lot of changes Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
This commit is contained in:
@@ -108,7 +108,9 @@
|
||||
mod chain_spec;
|
||||
mod extension;
|
||||
|
||||
pub use chain_spec::{ChainSpec as GenericChainSpec, NoExtension};
|
||||
pub use chain_spec::{
|
||||
ChainSpec as GenericChainSpec, NoExtension, LightSyncState, SerializableLightSyncState,
|
||||
};
|
||||
pub use extension::{Group, Fork, Forks, Extension, GetExtension, get_extension};
|
||||
pub use sc_chain_spec_derive::{ChainSpecExtension, ChainSpecGroup};
|
||||
pub use sp_chain_spec::{Properties, ChainType};
|
||||
@@ -155,6 +157,8 @@ pub trait ChainSpec: BuildStorage + Send {
|
||||
///
|
||||
/// This will be used as storage at genesis.
|
||||
fn set_storage(&mut self, storage: Storage);
|
||||
/// Hardcode infomation to allow light clients to sync quickly into the chain spec.
|
||||
fn set_light_sync_state(&mut self, light_sync_state: SerializableLightSyncState);
|
||||
}
|
||||
|
||||
impl std::fmt::Debug for dyn ChainSpec {
|
||||
|
||||
Reference in New Issue
Block a user