From 62fb8da6aa0a280047b3d5a40c7a4cf4275369e6 Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Tue, 9 Jan 2024 06:55:37 -0500 Subject: [PATCH] refactor: rename ReadNodeScore to readNodeVotes --- service/p2p.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/p2p.go b/service/p2p.go index 880f842..8094cce 100644 --- a/service/p2p.go +++ b/service/p2p.go @@ -285,7 +285,7 @@ func (p *P2PImpl) OnNewPeerListen(peer net.Peer, verifyId bool) { } -func (p *P2PImpl) ReadNodeScore(nodeId *encoding.NodeId) (interfaces.NodeVotes, error) { +func (p *P2PImpl) readNodeVotes(nodeId *encoding.NodeId) (interfaces.NodeVotes, error) { node := p.nodesBucket.Get(nodeId.Raw()) if node == nil { return NewNodeVotes(), nil @@ -305,7 +305,7 @@ func (p *P2PImpl) GetNodeScore(nodeId *encoding.NodeId) (float64, error) { return 1, nil } - score, err := p.ReadNodeScore(nodeId) + score, err := p.readNodeVotes(nodeId) if err != nil { return 0.5, err }