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

[keygen] Remove deprecated functions from the grind command #490

Merged

Conversation

samkim-crypto
Copy link

@samkim-crypto samkim-crypto commented Mar 29, 2024

Problem

The solana-keygen cli still has some deprecated functions from clap-v2 for the grind command logic.

Summary of Changes

Removed deprecated functions from the grind command.

I think most commits should be pretty straightforward except for f4aee92, which replaces grind validator functions with a united grind parser. It would be nice to implement a parser that returns a GrindMatch type directly so that we can run matches.get_one::<GrindMatch>(...), but the parsing logic depends on the ignore_case argument, which makes this hard to do. I ended up just defining String parser that executes the existing validation logic for grind arguments.

This is a follow-up to #438.

Fixes #

@samkim-crypto samkim-crypto marked this pull request as ready for review April 1, 2024 03:14
Copy link

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

Just nits. It's too bad about the GrindMatch parser, but I can't think of a better approach, given the clap api.

keygen/src/keygen.rs Outdated Show resolved Hide resolved
keygen/src/keygen.rs Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.8%. Comparing base (212cbdb) to head (065267f).
Report is 29 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #490   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         842      842           
  Lines      228436   228436           
=======================================
+ Hits       186996   187008   +12     
+ Misses      41440    41428   -12     

@samkim-crypto samkim-crypto merged commit 025ed45 into anza-xyz:master Apr 2, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants