mirror of
https://github.com/OffchainLabs/prysm.git
synced 2026-01-08 23:18:15 -05:00
Refactor peer scorer into peerdata + scorers (#7452)
* updates comment * manager -> service * rename receiver * refacgtor bad_responses * refactor store * update status service * extends data service * status service test * refactor block provider scorer * misc updates * fix tests * data -> peerdata * gazelle * peerdata/store test * limit the visibility scope * Nishant's suggestion Co-authored-by: prylabs-bulldozer[bot] <58059840+prylabs-bulldozer[bot]@users.noreply.github.com>
This commit is contained in:
@@ -2,12 +2,10 @@ package peers_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"math"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/flags"
|
||||
"github.com/prysmaticlabs/prysm/beacon-chain/p2p/peers"
|
||||
"github.com/prysmaticlabs/prysm/shared/featureconfig"
|
||||
"github.com/sirupsen/logrus"
|
||||
)
|
||||
@@ -35,8 +33,3 @@ func TestMain(m *testing.M) {
|
||||
flags.Init(resetFlags)
|
||||
os.Exit(code)
|
||||
}
|
||||
|
||||
// roundScore returns score rounded in accordance with the score manager's rounding factor.
|
||||
func roundScore(score float64) float64 {
|
||||
return math.Round(score*peers.ScoreRoundingFactor) / peers.ScoreRoundingFactor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user