Skip to content
Open
Show file tree
Hide file tree
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
15 changes: 3 additions & 12 deletions crates/op-rbuilder/src/builder/continuous/publish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use reth_node_api::PayloadBuilderError;
use reth_optimism_node::OpBuiltPayload;
use std::{ops::ControlFlow, time::Instant};
use tokio::sync::watch;
use tracing::{debug, info, metadata::Level, span, warn};
use tracing::{debug, info, metadata::Level, span};

// === Per-interval publishing and advancement =================
//
Expand Down Expand Up @@ -123,20 +123,11 @@ where
.ws_pub()
.publish(fb_payload_delta)
.map_err(PayloadBuilderError::other)?;
best_payload_tx.send_replace(Some(new_payload.clone()));
self.notify_built_payload(new_payload.clone());
let slot_offset_ms =
compute_slot_offset_ms(ctx.attributes().timestamp(), self.config().block_time);
record_flashblock_publish_timing(candidate.fb_state.flashblock_index(), slot_offset_ms);
self.built_fb_payload_tx()
.try_send(new_payload.clone())
.map_err(PayloadBuilderError::other)?;
if let Err(e) = self.built_payload_tx().try_send(new_payload.clone()) {
warn!(
target: "payload_builder",
error = %e,
"Failed to send updated payload"
);
}
best_payload_tx.send_replace(Some(new_payload.clone()));
Ok(flashblock_byte_size)
}

Expand Down
10 changes: 1 addition & 9 deletions crates/op-rbuilder/src/builder/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,6 @@ impl<Pool, Client, BuilderTx> OpPayloadBuilderInner<Pool, Client, BuilderTx> {
&self.client
}

pub(crate) fn built_fb_payload_tx(&self) -> &mpsc::Sender<OpBuiltPayload> {
&self.built_fb_payload_tx
}

pub(crate) fn built_payload_tx(&self) -> &mpsc::Sender<OpBuiltPayload> {
&self.built_payload_tx
}

pub(crate) fn ws_pub(&self) -> &WebSocketPublisher {
&self.ws_pub
}
Expand Down Expand Up @@ -1020,7 +1012,7 @@ where
})
}

fn notify_built_payload(&self, payload: OpBuiltPayload) {
pub(crate) fn notify_built_payload(&self, payload: OpBuiltPayload) {
if let Err(e) = self.built_fb_payload_tx.try_send(payload.clone()) {
warn!(
target: "payload_builder",
Expand Down
Loading