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

refactor: GetValidators return all validators in state validators map #512

Merged
merged 12 commits into from
Jun 18, 2023
Merged

refactor: GetValidators return all validators in state validators map #512

merged 12 commits into from
Jun 18, 2023

Conversation

Ja7ad
Copy link
Contributor

@Ja7ad Ja7ad commented Jun 15, 2023

Description

gRPC: GetValidators should return the list of all validator addresses

Related issue(s)

Fixed #502

/claim #502

# Conflicts:
#	state/mock.go
#	state/state.go
state/facade.go Outdated Show resolved Hide resolved
store/mock.go Outdated Show resolved Hide resolved
www/grpc/blockchain.go Show resolved Hide resolved
@b00f
Copy link
Collaborator

b00f commented Jun 17, 2023

@Ja7ad Please rebase the PR. It has some conflicts.

@codecov
Copy link

codecov bot commented Jun 17, 2023

Codecov Report

Merging #512 (e67efd6) into main (5e2f135) will increase coverage by 0.01%.
The diff coverage is 92.30%.

@@            Coverage Diff             @@
##             main     #512      +/-   ##
==========================================
+ Coverage   83.15%   83.16%   +0.01%     
==========================================
  Files         154      154              
  Lines        7306     7318      +12     
==========================================
+ Hits         6075     6086      +11     
- Misses        951      952       +1     
  Partials      280      280              

store/validator.go Outdated Show resolved Hide resolved
store/mock.go Outdated Show resolved Hide resolved
@b00f
Copy link
Collaborator

b00f commented Jun 17, 2023

@Ja7ad I noticed a failure in TestIterateValidators tests in store module.
I guess the random number was zero and therefore the iterator didn't iterate. We can avoid this case by increasing the total by 1 :

	total := util.RandInt32(100) + 1

Similarly TestAccountByAddress test also should be updated. It is not related to this PR, but since it happens here for the first time and it is small matter, let's fix it here.

@Ja7ad
Copy link
Contributor Author

Ja7ad commented Jun 17, 2023

@b00f all thing changes done

@Ja7ad Ja7ad self-assigned this Jun 17, 2023
@b00f
Copy link
Collaborator

b00f commented Jun 18, 2023

@Ja7ad Thanks

@b00f b00f merged commit c897041 into pactus-project:main Jun 18, 2023
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.

gRPC: GetValidators should return the list of all validator addresses
2 participants