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

rpcserver: add verifychain & getdifficulty tests. #2285

Merged
merged 1 commit into from
Jul 26, 2020

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Jul 21, 2020

This adds rpc tests for the verifychain and getdifficulty rpcs.

Work towards #2069.

@davecgh davecgh added this to the 1.6.0 milestone Jul 21, 2020
rpcserverhandlers_test.go Outdated Show resolved Hide resolved
@dnldd dnldd force-pushed the add_verify_and_getdiff_tests branch from 39df38e to cf2089f Compare July 21, 2020 21:51
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

In addition to the review, I confirmed full coverage for both functions after the latest update:

$ go test -run="TestHandle(GetDifficulty|VerifyChain)" -coverprofile=cov.out
$ go tool cover -func=cov.out | grep -E "handle(GetDifficulty|VerifyChain)"
github.com/decred/dcrd/rpcserver.go:2164:       handleGetDifficulty             100.0%
github.com/decred/dcrd/rpcserver.go:4780:       handleVerifyChain               100.0%

Copy link
Member

@rstaudt2 rstaudt2 left a comment

Choose a reason for hiding this comment

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

Looks good overall, just a couple of inline comments

rpcserverhandlers_test.go Outdated Show resolved Hide resolved
rpcserverhandlers_test.go Outdated Show resolved Hide resolved
rpcserverhandlers_test.go Outdated Show resolved Hide resolved
@dnldd dnldd force-pushed the add_verify_and_getdiff_tests branch from cf2089f to 33df382 Compare July 23, 2020 14:58
This adds rpc tests for the verifychain and getdifficulty rpcs.
@dnldd dnldd force-pushed the add_verify_and_getdiff_tests branch from 33df382 to aa4ae0e Compare July 26, 2020 00:40
@davecgh davecgh merged commit 5a1c705 into decred:master Jul 26, 2020
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

3 participants