From f9e94ce2055e0becbd05224cd234a83645146621 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 9 Jan 2024 06:53:51 -0500 Subject: [PATCH] fix: ensure NewNodeVotes defaults to 0 --- service/vote.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/service/vote.go b/service/vote.go index 1696ee6..1748288 100644 --- a/service/vote.go +++ b/service/vote.go @@ -11,7 +11,10 @@ type NodeVotesImpl struct { } func NewNodeVotes() interfaces.NodeVotes { - return &NodeVotesImpl{} + return &NodeVotesImpl{ + good: 0, + bad: 0, + } } func (n *NodeVotesImpl) Good() int {