Skip to content

Commit 0b067a5

Browse files
committed
on_new_state
1 parent 26644e5 commit 0b067a5

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

crates/n42/engine-types/src/job_generator.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ use tokio::{
3232
};
3333
use tracing::{debug, warn};
3434
use crate::job::{Cancelled, N42PayloadJob, N42PayloadJobGeneratorConfig, PendingPayload};
35+
use crate::{
36+
minedblock::{MinedblockExtApiServer,MinedblockExt},
37+
unverifiedblock::UnverifiedBlock,
38+
};
3539

3640
/// The [`PayloadJobGenerator`] that creates [`BasicPayloadJob`]s.
3741
#[derive(Debug)]
@@ -204,6 +208,12 @@ where
204208
}
205209
}
206210

211+
let minedblock_ext = MinedblockExt::instance();
212+
let unvalidated_block = UnverifiedBlock::new(new_execution_outcome.first_block,cached.clone());
213+
if let Err(err) = minedblock_ext.send_block(unvalidated_block) {
214+
warn!(target: "payload_builder", "Failed to send unvalidated block: {:?}", err);
215+
}
216+
207217
self.pre_cached = Some(PrecachedState { block: committed.tip().hash(), cached });
208218
}
209219
}

0 commit comments

Comments
 (0)