pub enum Misbehavior {
InvalidBlockHeader,
InvalidBlock,
InvalidTransaction,
UnexpectedMessage,
AddrFlood,
InvalidNetworkMessage,
DosAttack,
UnconnectableBlock,
DuplicateVersion,
Custom(i32),
}Expand description
Categories of protocol violations with associated ban scores.
Variants§
InvalidBlockHeader
Invalid block header (immediate ban).
InvalidBlock
Block fails consensus validation (immediate ban).
InvalidTransaction
Transaction fails validation.
UnexpectedMessage
Unexpected message during handshake.
AddrFlood
Flooding with addr messages.
InvalidNetworkMessage
Malformed or unrecognised network message.
DosAttack
Generic DoS (rate-limit exceeded, etc.).
UnconnectableBlock
Sent a block that doesn’t connect to our chain.
DuplicateVersion
Peer sent a version message after handshake was already complete.
Custom(i32)
Custom score (for future extensions).
Implementations§
Trait Implementations§
Source§impl Clone for Misbehavior
impl Clone for Misbehavior
Source§fn clone(&self) -> Misbehavior
fn clone(&self) -> Misbehavior
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Misbehavior
impl Debug for Misbehavior
Source§impl Display for Misbehavior
impl Display for Misbehavior
Source§impl PartialEq for Misbehavior
impl PartialEq for Misbehavior
impl Copy for Misbehavior
impl Eq for Misbehavior
impl StructuralPartialEq for Misbehavior
Auto Trait Implementations§
impl Freeze for Misbehavior
impl RefUnwindSafe for Misbehavior
impl Send for Misbehavior
impl Sync for Misbehavior
impl Unpin for Misbehavior
impl UnsafeUnpin for Misbehavior
impl UnwindSafe for Misbehavior
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more