Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add invalid block hook field to tree #10432

Merged
merged 11 commits into from
Sep 3, 2024
Merged

Conversation

Rjected
Copy link
Member

@Rjected Rjected commented Aug 21, 2024

ref #10425

@Rjected Rjected force-pushed the dan/invalid-block-hook branch 2 times, most recently from f36d88a to 74ffa2f Compare August 21, 2024 21:39
@emhane emhane added A-consensus Related to the consensus engine A-blockchain-tree Related to sidechains, reorgs and pending blocks C-enhancement New feature or request labels Aug 21, 2024
@Rjected Rjected force-pushed the dan/invalid-block-hook branch 9 times, most recently from 2715369 to 61a1f94 Compare August 23, 2024 21:30
crates/engine/tree/src/tree/mod.rs Outdated Show resolved Hide resolved
crates/engine/tree/src/tree/mod.rs Outdated Show resolved Hide resolved
@shekhirin shekhirin requested a review from mattsse August 30, 2024 11:29
@shekhirin shekhirin changed the title feat: add invalid block hook field to tree feat: add bad block hook field to tree Aug 30, 2024
@shekhirin shekhirin force-pushed the dan/invalid-block-hook branch 3 times, most recently from 6db7ae6 to 3ebd86d Compare August 30, 2024 12:22
@shekhirin shekhirin changed the title feat: add bad block hook field to tree feat: add invalid block hook field to tree Aug 30, 2024
Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

crates/engine/tree/src/tree/invalid_block_hook.rs Outdated Show resolved Hide resolved
@@ -508,6 +510,29 @@ pub struct EngineApiTreeHandler<P, E, T: EngineTypes> {
config: TreeConfig,
/// Metrics for the engine api.
metrics: EngineApiMetrics,
/// A bad block hook.
invalid_block_hook: Box<dyn InvalidBlockHook>,
Copy link
Collaborator

@mattsse mattsse Sep 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could also make this optional, so that it doesn't leak into the new function and use pub set_invalid_block_hook to optionally set one

but can consider doing this when we add a real impl of this

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, will address this in #10629

@shekhirin shekhirin added this pull request to the merge queue Sep 3, 2024
@shekhirin shekhirin removed this pull request from the merge queue due to a manual request Sep 3, 2024
@shekhirin shekhirin added this pull request to the merge queue Sep 3, 2024
Merged via the queue into main with commit dea1e21 Sep 3, 2024
36 checks passed
@shekhirin shekhirin deleted the dan/invalid-block-hook branch September 3, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-blockchain-tree Related to sidechains, reorgs and pending blocks A-consensus Related to the consensus engine C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants