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

After running it for a day it started counting backwards. #4

Open
0tokens opened this issue Dec 15, 2023 · 5 comments
Open

After running it for a day it started counting backwards. #4

0tokens opened this issue Dec 15, 2023 · 5 comments

Comments

@0tokens
Copy link

0tokens commented Dec 15, 2023

After running it for a day it started counting backwards.
By the way, it runs fast and nice, nice project!

@wetdro
Copy link

wetdro commented Dec 15, 2023

I updated it to record keys already used and save sessions.....that may work for you

@RandstormBTC
Copy link
Owner

After running it for a day it started counting backwards. By the way, it runs fast and nice, nice project!

That is strange. There are still a few bugs I guess but I've not seen in count backwards yet.

I updated it to record keys already used and save sessions.....that may work for you

That's a good idea, thanks!

@0tokens
Copy link
Author

0tokens commented Dec 17, 2023

You can replicate the problem with counting quickly by changing to this line:
total_keys_generated.value += 10000
After some time the values go below 0.
I hope you can solve it since it's a nice Bitcoin lottery player :-) Many thanks in advance!

@RandstormBTC
Copy link
Owner

It has to do with Python's multiprocessing. the Value type doesn't have built-in atomic operations, so concurrent updates may lead to incorrect results.

@wetdro
Copy link

wetdro commented Dec 23, 2023

Generated Keys: -2,103,267,295 | Keys/Second: -9,7410
Generated Keys: -2,102,467,295 | Keys/Second: -9,731
Generated Keys: -2,088,767,295 | Keys/Second: -9,660

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

No branches or pull requests

3 participants