From be946a89288cb779fc0846270c80bf112610746b Mon Sep 17 00:00:00 2001 From: Noam Berg Date: Thu, 24 Sep 2020 11:40:26 +0300 Subject: [PATCH] fix typo in committee metric --- services/consensusalgo/leanhelixconsensus/membership.go | 2 +- services/consensuscontext/committee.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/services/consensusalgo/leanhelixconsensus/membership.go b/services/consensusalgo/leanhelixconsensus/membership.go index a5421f2b5..6241faf3a 100644 --- a/services/consensusalgo/leanhelixconsensus/membership.go +++ b/services/consensusalgo/leanhelixconsensus/membership.go @@ -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, ",") } diff --git a/services/consensuscontext/committee.go b/services/consensuscontext/committee.go index cdaef2906..1571a5ebd 100644 --- a/services/consensuscontext/committee.go +++ b/services/consensuscontext/committee.go @@ -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))