doc: update some exexhead docs (#11214)

This commit is contained in:
James Prestwich
2024-09-25 11:37:25 -04:00
committed by GitHub
parent 63f56734ec
commit 1d56382b8d
2 changed files with 9 additions and 4 deletions

View File

@ -100,10 +100,13 @@ where
P: BlockReader + HeaderProvider + StateProviderFactory + Clone + Unpin + 'static,
E: BlockExecutorProvider + Clone + Unpin + 'static,
{
/// Subscribe to notifications with the given head.
/// Subscribe to notifications with the given head. This head is the ExEx's
/// latest view of the host chain.
///
/// Notifications will be sent starting from the head, not inclusive. For example, if
/// `head.number == 10`, then the first notification will be with `block.number == 11`.
/// Notifications will be sent starting from the head, not inclusive. For
/// example, if `head.number == 10`, then the first notification will be
/// with `block.number == 11`. A `head.number` of 10 indicates that the ExEx
/// has processed up to block 10, and is ready to process block 11.
pub fn with_head(self, head: ExExHead) -> ExExNotificationsWithHead<P, E> {
ExExNotificationsWithHead::new(
self.node_head,

View File

@ -1,6 +1,8 @@
use alloy_eips::BlockNumHash;
/// A head of the ExEx. It determines the highest block committed to the internal ExEx state.
/// A head of the ExEx. It contains the highest host block committed to the
/// internal ExEx state. I.e. the latest block that the ExEx has fully
/// processed.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct ExExHead {
/// The head block.