Skip to content

Commit

Permalink
refactor: stream_bodies -> bodies_stream
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg committed Nov 12, 2022
1 parent e9d7c77 commit ac0b98c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/interfaces/src/p2p/bodies/downloader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ pub trait BodyDownloader: Sync + Send {
///
/// It is *not* guaranteed that all the requested bodies are fetched: the downloader may close
/// the stream before the entire range has been fetched for any reason
fn stream_bodies<'a, 'b, I>(&'a self, headers: I) -> BodiesStream<'a>
fn bodies_stream<'a, 'b, I>(&'a self, headers: I) -> BodiesStream<'a>
where
I: IntoIterator<Item = H256>,
<I as IntoIterator>::IntoIter: Send + 'b,
Expand Down
2 changes: 1 addition & 1 deletion crates/net/bodies-downloaders/src/concurrent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ impl<C: BodiesClient> BodyDownloader for ConcurrentDownloader<C> {
&self.client
}

fn stream_bodies<'a, 'b, I>(&'a self, headers: I) -> BodiesStream<'a>
fn bodies_stream<'a, 'b, I>(&'a self, headers: I) -> BodiesStream<'a>
where
I: IntoIterator<Item = H256>,
<I as IntoIterator>::IntoIter: Send + 'b,
Expand Down
2 changes: 1 addition & 1 deletion crates/stages/src/stages/bodies.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ impl<DB: Database, D: BodyDownloader, C: Consensus> Stage<DB> for BodyStage<D, C
let mut block_number = starting_block;
while let Some((header_hash, body)) = self
.downloader
.stream_bodies(
.bodies_stream(
header_hashes_cursor
.walk(starting_block)?
.filter_map(|item| item.ok().map(|(_, hash)| hash))
Expand Down

0 comments on commit ac0b98c

Please sign in to comment.