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

Don't stake for previously staked times #1005

Closed
Tracked by #1013
alfiedotwtf opened this issue Jun 28, 2023 · 0 comments
Closed
Tracked by #1013

Don't stake for previously staked times #1005

alfiedotwtf opened this issue Jun 28, 2023 · 0 comments
Assignees

Comments

@alfiedotwtf
Copy link
Contributor

Currently, each call to produce_block() will stake from the "last block timestamp" to 'last block timestamp + some chain configuration" value...

In the produce_block() call, if there is ever a recoverable error, we re-attempt to stake until we hit that maximum time limit. If still no successful block has been solved, we return with a TryAgainLater. This is fine for a single call to produce_block() as it prevents staking over timeframes that we have already attempted, but this currently doesn't prevent rework on subsequent calls.

This fix will make every call to produce_block() restrict the search space to only timestamps we have not yet searched.

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

1 participant