usecrate::Score;/// Peers behaviours
/// we maintain a score to each peer
/// report peer behaviour will affects peer's score
////// Currently this feature is disabled, maybe someday we will add it back or totally remove it.
#[derive(Debug, Clone, Copy, Eq, PartialEq)]pubenumBehaviour{/// Good behaviour
#[cfg(test)]
TestGood,/// Bad behaviour
#[cfg(test)]
TestBad,}implBehaviour{/// Behaviour score
pubfnscore(self)-> Score{#[cfg(test)]matchself{Behaviour::TestGood =>10,Behaviour::TestBad =>-10,}#[cfg(not(test))]0}}