From 2d04a386f6e06b2742188f8f05ef0199c3a366cf Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sun, 28 May 2023 21:27:56 +0300 Subject: skip expired votes --- internal/quorum/quorum.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'internal') diff --git a/internal/quorum/quorum.go b/internal/quorum/quorum.go index 6c4bcb6..01c861a 100644 --- a/internal/quorum/quorum.go +++ b/internal/quorum/quorum.go @@ -91,6 +91,9 @@ func (quo Quorum) score() (scores []Score) { scoreMap := make(map[string]int) for _, vote := range quo.votes { + if vote.Expired() { + continue + } for _, id := range vote.IDs { score, _ := scoreMap[id] scoreMap[id] = score + 1 -- cgit v1.2.3