Skip to content

Commit c4649e4

Browse files
committed
block.body definitly exists unless it's a light client or fast sync in storage chain mode
1 parent 5cab601 commit c4649e4

File tree

1 file changed

+5
-2
lines changed
  • crates/sc-consensus-subspace/src

1 file changed

+5
-2
lines changed

crates/sc-consensus-subspace/src/lib.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1489,9 +1489,12 @@ where
14891489
let root_blocks = self.root_blocks.lock();
14901490
// If there are root blocks expected to be included in this block, check them
14911491
if let Some(correct_root_blocks) = root_blocks.peek(&block_number) {
1492-
// TODO: Why there could be no body? Light client?
14931492
let mut found = false;
1494-
for extrinsic in block.body.as_ref().unwrap() {
1493+
for extrinsic in block
1494+
.body
1495+
.as_ref()
1496+
.expect("Light client or fast sync is unsupported; qed")
1497+
{
14951498
match self
14961499
.client
14971500
.runtime_api()

0 commit comments

Comments
 (0)