Skip to content

Commit

Permalink
non exhaustive
Browse files Browse the repository at this point in the history
  • Loading branch information
shekhirin committed Sep 3, 2024
1 parent daae4f4 commit 57b4b76
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion crates/engine/service/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ mod tests {
pruner,
PayloadBuilderHandle::new(tx),
TreeConfig::default(),
Box::new(NoopInvalidBlockHook),
Box::new(NoopInvalidBlockHook::default()),
);
}
}
3 changes: 2 additions & 1 deletion crates/engine/tree/src/tree/invalid_block_hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ where
}

/// A no-op [`InvalidBlockHook`] that does nothing.
#[derive(Debug)]
#[derive(Debug, Default)]
#[non_exhaustive]
pub struct NoopInvalidBlockHook;

impl InvalidBlockHook for NoopInvalidBlockHook {
Expand Down
2 changes: 1 addition & 1 deletion crates/node/builder/src/launch/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ where
warn!(target: "reth::cli", ?hook_type, "Invalid block hooks are not implemented yet! The `debug.invalid-block-hook` flag will do nothing for now.");
}

let invalid_block_hook = Box::new(NoopInvalidBlockHook);
let invalid_block_hook = Box::new(NoopInvalidBlockHook::default());

// Configure the consensus engine
let mut eth_service = EngineService::new(
Expand Down

0 comments on commit 57b4b76

Please sign in to comment.