Skip to content

Commit

Permalink
Merge pull request #1628 from orbs-network/issue/fix-status-typo
Browse files Browse the repository at this point in the history
fix typo in committee metric
  • Loading branch information
ronnno authored Sep 28, 2020
2 parents 7b93a84 + be946a8 commit cc97bed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion services/consensusalgo/leanhelixconsensus/membership.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func toMembers(nodeAddresses []primitives.NodeAddress, weights []primitives.Weig
func toMembersString(nodeAddresses []primitives.NodeAddress, weights []primitives.Weight) string {
members := make([]string, len(nodeAddresses))
for i := range nodeAddresses {
members[i] = fmt.Sprintf("{\"Address:\": \"%v\", \"Weight\": %d}", nodeAddresses[i], weights[i]) // %v is because NodeAddress has .String()
members[i] = fmt.Sprintf("{\"Address\": \"%v\", \"Weight\": %d}", nodeAddresses[i], weights[i]) // %v is because NodeAddress has .String()
}
return strings.Join(members, ",")
}
Expand Down
2 changes: 1 addition & 1 deletion services/consensuscontext/committee.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func (s *service) RequestValidationCommittee(ctx context.Context, input *service
s.metrics.committeeSize.Update(int64(len(committee)))
committeeStringArray := make([]string, len(committee))
for j, nodeAddress := range committee {
committeeStringArray[j] = fmt.Sprintf("{\"Address:\": \"%v\", \"Weight\": %d}", nodeAddress, orderedWeights[j]) // %v is because NodeAddress has .String()
committeeStringArray[j] = fmt.Sprintf("{\"Address\": \"%v\", \"Weight\": %d}", nodeAddress, orderedWeights[j]) // %v is because NodeAddress has .String()
}
s.metrics.committeeMembers.Update("[" + strings.Join(committeeStringArray, ", ") + "]")
s.metrics.committeeRefTime.Update(int64(input.PrevBlockReferenceTime))
Expand Down

0 comments on commit cc97bed

Please sign in to comment.