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

fix: handle null block templates due to RPC errors #72

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

owenashurst
Copy link

If there are Bitcoin RPC errors e.g. RPC timeouts, then return the null block template. The null value will then be checked to return null when building a mining job, which is already filtered later in stratum-v1-jobs.service.ts via: filter(next => next != null).

Removing the exception being thrown better handles the situation when there are RPC errors, since the exception was otherwise bubbling up to the mining job observer, thus causing an issue where no more miner jobs were being sent if the RPC connection was resolved.

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.

1 participant