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

Add basic validation for work_generate RPC calls #563

Merged
merged 1 commit into from Sep 28, 2022

Conversation

keerifox
Copy link
Member

some of the community nodes return HTTP 200 OK responses with valid JSON but they don't actually contain any work. this results in users being stuck on nodes that cannot provide lightweight PoW, even if their setting is set to "Random", needing manual intervention

this PR adds basic checks that the work field is present, is a string, is 16 characters long, and only consists of hex characters. if any of those basic checks fail, the server automatically switches to a random one if the server setting is set to "Random"

image

@Joohansson Joohansson merged commit cd6d388 into Nault:master Sep 28, 2022
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.

None yet

2 participants