P2P Sync e2e (#7529)

Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
Luca Provini
2024-04-16 12:50:17 +02:00
committed by GitHub
parent 7f6a2b4cb5
commit af2dce3e65
14 changed files with 586 additions and 310 deletions

View File

@ -1,4 +1,3 @@
use futures_util::Stream;
use reth_engine_primitives::EngineTypes;
use tokio::sync::broadcast;
use tokio_stream::{
@ -26,9 +25,7 @@ pub struct PayloadEvents<Engine: EngineTypes> {
impl<Engine: EngineTypes + 'static> PayloadEvents<Engine> {
// Convert this receiver into a stream of PayloadEvents.
pub fn into_stream(
self,
) -> impl Stream<Item = Result<Events<Engine>, BroadcastStreamRecvError>> {
pub fn into_stream(self) -> BroadcastStream<Events<Engine>> {
BroadcastStream::new(self.receiver)
}
/// Asynchronously receives the next payload event.