Skip to content

Commit

Permalink
chore: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
gakonst committed Nov 19, 2022
1 parent 6591954 commit ea1512c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/stages/src/stages/bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ impl<DB: Database, D: BodyDownloader, C: Consensus> Stage<DB> for BodyStage<D, C
warn!("The body stage seems to be running first, no work can be completed.");
return Err(StageError::DatabaseIntegrity(DatabaseIntegrityError::BlockBody {
number: 0,
}));
}))
}

// The block we ended at last sync, and the one we are starting on now
Expand All @@ -93,7 +93,7 @@ impl<DB: Database, D: BodyDownloader, C: Consensus> Stage<DB> for BodyStage<D, C
// Short circuit in case we already reached the target block
let target = previous_stage_progress.min(starting_block + self.batch_size);
if target <= previous_block {
return Ok(ExecOutput { stage_progress: target, reached_tip: true, done: true });
return Ok(ExecOutput { stage_progress: target, reached_tip: true, done: true })
}

let bodies_to_download = self.bodies_to_download::<DB>(tx, starting_block, target)?;
Expand Down Expand Up @@ -178,7 +178,7 @@ impl<DB: Database, D: BodyDownloader, C: Consensus> Stage<DB> for BodyStage<D, C
let mut entry = block_body_cursor.last()?;
while let Some((key, body)) = entry {
if key.number() <= input.unwind_to {
break;
break
}

for num in 0..body.tx_amount {
Expand Down Expand Up @@ -220,7 +220,7 @@ impl<D: BodyDownloader, C: Consensus> BodyStage<D, C> {
.ok_or(DatabaseIntegrityError::Header { number: block_number, hash: header_hash })?
.1;
if header.ommers_hash == EMPTY_LIST_HASH && header.transactions_root == EMPTY_ROOT {
continue;
continue
}

bodies_to_download.push((block_number, header_hash));
Expand Down

0 comments on commit ea1512c

Please sign in to comment.