Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

block.body definitly exists unless it's a light client or using fast sync in storage chain mode #153

Merged
merged 1 commit into from
Nov 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions crates/sc-consensus-subspace/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,9 +1489,12 @@ where
let root_blocks = self.root_blocks.lock();
// If there are root blocks expected to be included in this block, check them
if let Some(correct_root_blocks) = root_blocks.peek(&block_number) {
// TODO: Why there could be no body? Light client?
let mut found = false;
for extrinsic in block.body.as_ref().unwrap() {
for extrinsic in block
.body
.as_ref()
.expect("Light client or fast sync is unsupported; qed")
{
match self
.client
.runtime_api()
Expand Down