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:
Arkadiy Paronyan
2021-07-17 10:58:37 +02:00
committed by GitHub
parent f07a41e87d
commit 5a65bf5515
27 changed files with 221 additions and 59 deletions
@@ -196,6 +196,8 @@ pub struct BlockImportParams<Block: BlockT, Transaction> {
pub post_digests: Vec<DigestItemFor<Block>>,
/// The body of the block.
pub body: Option<Vec<Block::Extrinsic>>,
/// Indexed transaction body of the block.
pub indexed_body: Option<Vec<Vec<u8>>>,
/// Specify how the new state is computed.
pub state_action: StateAction<Block, Transaction>,
/// Is this block finalized already?
@@ -233,6 +235,7 @@ impl<Block: BlockT, Transaction> BlockImportParams<Block, Transaction> {
justifications: None,
post_digests: Vec::new(),
body: None,
indexed_body: None,
state_action: StateAction::Execute,
finalized: false,
intermediates: HashMap::new(),
@@ -286,6 +289,7 @@ impl<Block: BlockT, Transaction> BlockImportParams<Block, Transaction> {
justifications: self.justifications,
post_digests: self.post_digests,
body: self.body,
indexed_body: self.indexed_body,
state_action,
finalized: self.finalized,
auxiliary: self.auxiliary,