mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
fix: race condition concurrent in and out from same peer (#7317)
This commit is contained in:
@ -40,8 +40,13 @@ pub enum ReputationChangeKind {
|
||||
}
|
||||
|
||||
impl ReputationChangeKind {
|
||||
/// Returns true if the reputation change is a reset.
|
||||
/// Returns true if the reputation change is a [ReputationChangeKind::Reset].
|
||||
pub fn is_reset(&self) -> bool {
|
||||
matches!(self, Self::Reset)
|
||||
}
|
||||
|
||||
/// Returns true if the reputation change is [ReputationChangeKind::Dropped].
|
||||
pub fn is_dropped(&self) -> bool {
|
||||
matches!(self, Self::Dropped)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user