chore(net): extract NetworkHandle methods for launching node to traits (#9966)

This commit is contained in:
Emilia Hane
2024-08-01 18:44:23 +02:00
committed by GitHub
parent f3fac56fd9
commit b10517b3bf
56 changed files with 985 additions and 776 deletions

View File

@ -189,3 +189,16 @@ impl From<Reputation> for ReputationChange {
Self(value)
}
}
/// Outcomes when a reputation change is applied to a peer
#[derive(Debug, Clone, Copy)]
pub enum ReputationChangeOutcome {
/// Nothing to do.
None,
/// Ban the peer.
Ban,
/// Ban and disconnect
DisconnectAndBan,
/// Unban the peer
Unban,
}