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

[release-v1.8] rpcserver: Modify getnetworkhashps -1 blocks logic. #3193

Merged

Conversation

davecgh
Copy link
Member

@davecgh davecgh commented Sep 27, 2023

This is a backport of #3181 to the 1.8 release branch.

Now that the target difficulty is calculated every block as opposed to
on an interval, the logic in the getnetworkhashps RPC that treated a
negative number of blocks as a signal to calculate back to the most
recent difficulty change no longer makes sense.

Thus, this updates the getnetworkhashps RPC to ignore negative values
so that the default number of blocks is used instead.

It also updates the RPC server help description accordingly to remove
mention of the previous behavior.
@davecgh davecgh added the rpc server api change Issues and/or pull requests that involve a new RPC server version or breaking to change to the API. label Sep 27, 2023
@davecgh davecgh added this to the 1.8.1 milestone Sep 27, 2023
Copy link
Member

@jrick jrick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pr description mentions 1.7 release branch but the backport commit itself looks good.

@davecgh
Copy link
Member Author

davecgh commented Sep 27, 2023

pr description mentions 1.7 release branch but the backport commit itself looks good.

Thanks. Updated.

@davecgh davecgh merged commit 0e3d49b into decred:release-v1.8 Sep 27, 2023
2 checks passed
@davecgh davecgh deleted the rel18_networkhashps_retgt_interval branch September 27, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rpc server api change Issues and/or pull requests that involve a new RPC server version or breaking to change to the API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants