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 cli ext event hooks example #4935

Merged
merged 2 commits into from
Oct 6, 2023

Conversation

mattsse
Copy link
Collaborator

@mattsse mattsse commented Oct 6, 2023

add an example for how to use the new reth config hooks with no additional cli arguments

This adds a NoArgsCliExt that makes it easier to configure a NodeConfig that doesn't take additional cli args

@mattsse mattsse added C-docs An addition or correction to our documentation C-enhancement New feature or request labels Oct 6, 2023
@mattsse mattsse force-pushed the matt/add-event-hooks-no-args-example branch from 8a776fc to 800c215 Compare October 6, 2023 15:36
@mattsse mattsse force-pushed the matt/add-event-hooks-no-args-example branch from 800c215 to 5f6fd14 Compare October 6, 2023 15:36
@mattsse mattsse added the A-cli Related to the reth CLI label Oct 6, 2023
@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

Merging #4935 (e88aa40) into main (50fa71d) will increase coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 0.00%.

Impacted file tree graph

Files Coverage Δ
bin/reth/src/cli/ext.rs 6.93% <0.00%> (-0.29%) ⬇️
bin/reth/src/cli/mod.rs 68.61% <0.00%> (-6.00%) ⬇️

... and 7 files with indirect coverage changes

Flag Coverage Δ
integration-tests 15.45% <0.00%> (+<0.01%) ⬆️
unit-tests 62.72% <0.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
reth binary 32.17% <0.00%> (-0.08%) ⬇️
blockchain tree 80.63% <ø> (ø)
pipeline 88.45% <ø> (ø)
storage (db) 74.43% <ø> (ø)
trie 94.48% <ø> (ø)
txpool 48.98% <ø> (+0.46%) ⬆️
networking 76.07% <ø> (ø)
rpc 57.69% <ø> (ø)
consensus 63.01% <ø> (ø)
revm 28.47% <ø> (ø)
payload builder 7.96% <ø> (ø)
primitives 85.41% <ø> (-0.01%) ⬇️

Copy link
Member

@gakonst gakonst left a comment

Choose a reason for hiding this comment

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

What are examples of things one would want to do with on_components_initialized and on_node_started?

Comment on lines +8 to +11
[dependencies]
reth.workspace = true
clap.workspace = true
eyre = "0.6"
Copy link
Member

Choose a reason for hiding this comment

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

so clean!

@gakonst gakonst added this pull request to the merge queue Oct 6, 2023
Merged via the queue into main with commit 36306ce Oct 6, 2023
24 checks passed
@gakonst gakonst deleted the matt/add-event-hooks-no-args-example branch October 6, 2023 18:15
mattsse added a commit that referenced this pull request Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Related to the reth CLI C-docs An addition or correction to our documentation C-enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants