mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 16:17:59 +00:00
Add a build-sync-spec subcommand and remove the CHT roots from the light sync state. (#6999)
* Move subcommands from sc-cli to nodes * Add --build-sync-spec subcommand * Remove CHTs from snapshots * Keep ProvideChtRoots
This commit is contained in:
@@ -401,8 +401,6 @@ where
|
||||
pub struct LightSyncState<Block: BlockT> {
|
||||
/// The header of the best finalized block.
|
||||
pub header: <Block as BlockT>::Header,
|
||||
/// A list of all CHTs in the chain.
|
||||
pub chts: Vec<<Block as BlockT>::Hash>,
|
||||
}
|
||||
|
||||
impl<Block: BlockT> LightSyncState<Block> {
|
||||
@@ -412,7 +410,6 @@ impl<Block: BlockT> LightSyncState<Block> {
|
||||
|
||||
SerializableLightSyncState {
|
||||
header: StorageData(self.header.encode()),
|
||||
chts: self.chts.iter().map(|hash| StorageData(hash.encode())).collect(),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -420,9 +417,6 @@ impl<Block: BlockT> LightSyncState<Block> {
|
||||
pub fn from_serializable(serialized: &SerializableLightSyncState) -> Result<Self, codec::Error> {
|
||||
Ok(Self {
|
||||
header: codec::Decode::decode(&mut &serialized.header.0[..])?,
|
||||
chts: serialized.chts.iter()
|
||||
.map(|cht| codec::Decode::decode(&mut &cht.0[..]))
|
||||
.collect::<Result<_, _>>()?,
|
||||
})
|
||||
}
|
||||
}
|
||||
@@ -433,7 +427,6 @@ impl<Block: BlockT> LightSyncState<Block> {
|
||||
#[serde(deny_unknown_fields)]
|
||||
pub struct SerializableLightSyncState {
|
||||
header: StorageData,
|
||||
chts: Vec<StorageData>,
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user