mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-29 10:17:57 +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:
@@ -228,7 +228,13 @@ impl ProtocolConfig {
|
||||
} else {
|
||||
match self.sync_mode {
|
||||
config::SyncMode::Full => sync::SyncMode::Full,
|
||||
config::SyncMode::Fast { skip_proofs } => sync::SyncMode::LightState { skip_proofs },
|
||||
config::SyncMode::Fast {
|
||||
skip_proofs,
|
||||
storage_chain_mode,
|
||||
} => sync::SyncMode::LightState {
|
||||
skip_proofs,
|
||||
storage_chain_mode
|
||||
},
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -597,6 +603,11 @@ impl<B: BlockT> Protocol<B> {
|
||||
} else {
|
||||
None
|
||||
},
|
||||
indexed_body: if request.fields.contains(message::BlockAttributes::INDEXED_BODY) {
|
||||
Some(block_data.indexed_body)
|
||||
} else {
|
||||
None
|
||||
},
|
||||
receipt: if !block_data.message_queue.is_empty() {
|
||||
Some(block_data.receipt)
|
||||
} else {
|
||||
@@ -965,6 +976,7 @@ impl<B: BlockT> Protocol<B> {
|
||||
hash: header.hash(),
|
||||
header: Some(header),
|
||||
body: None,
|
||||
indexed_body: None,
|
||||
receipt: None,
|
||||
message_queue: None,
|
||||
justification: None,
|
||||
|
||||
Reference in New Issue
Block a user