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(bin) : max_values Macro for CLI args parsing #5379

Merged
merged 8 commits into from
Nov 10, 2023

Conversation

DoTheBestToGetTheBest
Copy link
Contributor

@DoTheBestToGetTheBest DoTheBestToGetTheBest commented Nov 10, 2023

This PR adds the max_values Macro , extending CLI argument, this macro was added because we will need in future to turn the limit off of some data type, one example would be to limit off the size of max-response-size when user wants to go to max value ( Ref : #5376)

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.

good start but we should just convert "max" to u32 directly

bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
@DoTheBestToGetTheBest DoTheBestToGetTheBest changed the title feat(bin) : MaxAsNone type for CLI args parsing feat(bin) : MaxU32 type for CLI args parsing Nov 10, 2023
bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
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.

nice, almost there

bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
bin/reth/src/args/types.rs Show resolved Hide resolved
@DoTheBestToGetTheBest
Copy link
Contributor Author

nice, almost there

does it look better?

bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
bin/reth/src/args/types.rs Outdated Show resolved Hide resolved
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
@DoTheBestToGetTheBest DoTheBestToGetTheBest changed the title feat(bin) : MaxU32 type for CLI args parsing feat(bin) : max_values Macro for CLI args parsing Nov 10, 2023
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

next we can replace the fields in the rpc server args with this

@mattsse mattsse added the A-cli Related to the reth CLI label Nov 10, 2023
@mattsse mattsse added this pull request to the merge queue Nov 10, 2023
Merged via the queue into paradigmxyz:main with commit 5beb105 Nov 10, 2023
25 checks passed
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants