Subject: Feedback Request on Project Dependencies and Code Structure
Hi everyone,
I wanted to reach out to the community here for feedback on my project. If this isn't the right place for such a post, please let me know, and I'll remove my message immediately.
I'm currently working on optimizing my project for best practices as well as efficiency and stability. The goal is to make it completely industry standard. I've chosen certain dependencies and set them up with specific versions, and I'm looking for input on these choices. The structure of the code is also something I'd like to get feedback on.
Any positive feedback is greatly appreciated, and I'm open to constructive criticism as well. I'm looking to improve, so please keep any feedback productive.
Have you considered the console crate? It makes getting user input and setting up prompts a lot simpler than having to build a bunch of print statements and variables.
You should also look into the anyhow crate for binaries when handling errors and error conversions.
Why are you defining the get_chronos function within the loop within main?
It appears that you loop over the input, then break after one iteration, rendering the loop useless.
Using if let Some in the get_current_block_hash is a bit clunky since you need to still handle the error cases. Using something like a match here would be more clear. You could even do it functionally using ok_or_else and and_then.
For your hash_to_hex function, you can use a functional approach: