refactor: rename ReadNodeScore to readNodeVotes

This commit is contained in:
Derrick Hammer 2024-01-09 06:55:37 -05:00
parent 04611d83eb
commit 62fb8da6aa
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 2 additions and 2 deletions

View File

@ -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()) node := p.nodesBucket.Get(nodeId.Raw())
if node == nil { if node == nil {
return NewNodeVotes(), nil return NewNodeVotes(), nil
@ -305,7 +305,7 @@ func (p *P2PImpl) GetNodeScore(nodeId *encoding.NodeId) (float64, error) {
return 1, nil return 1, nil
} }
score, err := p.ReadNodeScore(nodeId) score, err := p.readNodeVotes(nodeId)
if err != nil { if err != nil {
return 0.5, err return 0.5, err
} }