Skip to content

Conversation

sashass1315
Copy link
Contributor

Problem: The --debug.invalid-block-hook flag used default_value = "witness" with Option<_>, which always parsed as Some(Witness). This made the None branch (installing NoopInvalidBlockHook) unreachable via CLI, so users couldn’t disable hooks.

Solution: Removed the clap default for --debug.invalid-block-hook and set DebugArgs::default().invalid_block_hook = None. Updated tests to expect None by default and amended CLI docs to state hooks are disabled by default.

Impact: Omitting the flag now disables invalid block hooks; users must pass the flag to enable hooks (e.g., --debug.invalid-block-hook witness).

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.

hmm, do we want to remove this @Rjected

feels like having the witness hook as default doesnt hurt?

@Rjected
Copy link
Member

Rjected commented Oct 14, 2025

feels like having the witness hook as default doesnt hurt?

yes, we need the witness hook on by default, otherwise the chance of getting that data for debugging on a bad block is very low

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants