Skip to content

Commit

Permalink
chore(engine): add StateHookSender constructor (paradigmxyz#13162)
Browse files Browse the repository at this point in the history
Co-authored-by: Matthias Seitz <[email protected]>
  • Loading branch information
fgimenez and mattsse authored Dec 5, 2024
1 parent 8226fa0 commit d939876
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion crates/engine/tree/src/tree/root.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ impl ProofSequencer {
#[allow(dead_code)]
pub(crate) struct StateHookSender(Sender<StateRootMessage>);

#[allow(dead_code)]
impl StateHookSender {
pub(crate) const fn new(inner: Sender<StateRootMessage>) -> Self {
Self(inner)
}
}

impl Deref for StateHookSender {
type Target = Sender<StateRootMessage>;

Expand Down Expand Up @@ -736,7 +743,7 @@ mod tests {
let task = StateRootTask::new(config, tx.clone(), rx);
let handle = task.spawn();

let state_hook_sender = StateHookSender(tx);
let state_hook_sender = StateHookSender::new(tx);
for update in state_updates {
state_hook_sender
.send(StateRootMessage::StateUpdate(update))
Expand Down

0 comments on commit d939876

Please sign in to comment.