mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-22 17:21:07 +00:00
Storage chains sync (#9171)
* Sync storage chains * Test * Apply suggestions from code review Co-authored-by: cheme <emericchevalier.pro@gmail.com> * Separate block body and indexed body * Update client/db/src/lib.rs Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: cheme <emericchevalier.pro@gmail.com> Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -68,6 +68,8 @@ pub struct IncomingBlock<B: BlockT> {
|
||||
pub header: Option<<B as BlockT>::Header>,
|
||||
/// Block body if requested.
|
||||
pub body: Option<Vec<<B as BlockT>::Extrinsic>>,
|
||||
/// Indexed block body if requested.
|
||||
pub indexed_body: Option<Vec<Vec<u8>>>,
|
||||
/// Justification(s) if requested.
|
||||
pub justifications: Option<Justifications>,
|
||||
/// The peer, we received this from
|
||||
@@ -269,6 +271,7 @@ pub(crate) async fn import_single_block_metered<B: BlockT, V: Verifier<B>, Trans
|
||||
cache.extend(keys.into_iter());
|
||||
}
|
||||
import_block.import_existing = block.import_existing;
|
||||
import_block.indexed_body = block.indexed_body;
|
||||
let mut import_block = import_block.clear_storage_changes_and_mutate();
|
||||
if let Some(state) = block.state {
|
||||
import_block.state_action = StateAction::ApplyChanges(crate::StorageChanges::Import(state));
|
||||
|
||||
Reference in New Issue
Block a user