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: fix total voters count #520

Merged
merged 1 commit into from
Dec 6, 2022
Merged

fix: fix total voters count #520

merged 1 commit into from
Dec 6, 2022

Conversation

ulbqb
Copy link
Member

@ulbqb ulbqb commented Dec 6, 2022

Description

The function Voters is used to fetch and verify voters. However, the function Voters assigns the length of l.ValidatorSet.Validators instead of l.VoterSet.Voters to totalCount, which may cause incorrect return value in the remaining statements.

@ulbqb ulbqb marked this pull request as ready for review December 6, 2022 03:06
@ulbqb ulbqb requested review from Kynea0b, torao and tnasu as code owners December 6, 2022 03:06
@ulbqb ulbqb self-assigned this Dec 6, 2022
@ulbqb ulbqb requested a review from Mdaiki0730 December 6, 2022 03:06
@codecov
Copy link

codecov bot commented Dec 6, 2022

Codecov Report

Merging #520 (3a6d0a7) into main (160e52f) will increase coverage by 0.06%.
The diff coverage is n/a.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #520      +/-   ##
==========================================
+ Coverage   65.81%   65.88%   +0.06%     
==========================================
  Files         279      279              
  Lines       38057    38057              
==========================================
+ Hits        25047    25072      +25     
+ Misses      11209    11183      -26     
- Partials     1801     1802       +1     
Impacted Files Coverage Δ
types/voter_set.go 85.80% <0.00%> (-0.84%) ⬇️
p2p/pex/pex_reactor.go 79.05% <0.00%> (-0.62%) ⬇️
consensus/reactor.go 74.58% <0.00%> (-0.36%) ⬇️
blockchain/v0/reactor.go 69.79% <0.00%> (-0.34%) ⬇️
consensus/state.go 73.06% <0.00%> (-0.18%) ⬇️
p2p/conn/connection.go 80.38% <0.00%> (ø)
proxy/multi_app_conn.go 47.66% <0.00%> (ø)
abci/client/socket_client.go 72.96% <0.00%> (+0.87%) ⬆️
statesync/snapshots.go 94.96% <0.00%> (+1.25%) ⬆️
light/client.go 63.52% <0.00%> (+2.35%) ⬆️
... and 2 more

@ulbqb ulbqb merged commit 280514c into Finschia:main Dec 6, 2022
@ulbqb ulbqb deleted the fix/voter_count branch December 6, 2022 05:42
@Kynea0b Kynea0b added the C: enhancement Classification: New feature or its request, or improvement in maintainability of code label Dec 7, 2022
@tnasu tnasu added C: bug Classification: Something isn't working and removed C: enhancement Classification: New feature or its request, or improvement in maintainability of code labels Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: bug Classification: Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants