Closed kfrancis closed 1 year ago
Use case: The largest core machine I have is my dev machine and I'd like to generate a rather nice key but I need to use the machine. Pausing would allow me to be able to continue execution at the end of my day, then pause the next, etc - until the app completes normally.
No need to pause, you can just stop and start over. The tool only generates random keys with Secp256k1 and checks them for validity. You do not miss anything when starting over.
Eh, after putting in 12 hours of work trying to generate a vanity pub key - it would be nice not to lose that time simply because I need to use the machine.
Once more: You don't lose any time. Random numbers are generated, there is no "list" that is worked off. It is like a new block on Bitcoin blockchain: on average it takes 10mins for a new block, but sometimes it only takes 1 second.
So you can just stop and start the script and don't lose time. If you are lucky your preferred vanity key will be created in 1s if your are unlucky you might wait forever. How long you have to wait is coincidence and does not depend on how long you have crunched the numbers. This might not be intuitive but it is still true! ;-)
It would be nice to be able to "pause" execution if that's possible, something like using ctrlc:
or perhaps implementing a background thread that listens for keyboard input and use channel to communicate with main thread?