pub struct EquivocationProof<Header, Id> {
pub offender: Id,
pub slot: Slot,
pub first_header: Header,
pub second_header: Header,
}Expand description
Represents an equivocation proof. An equivocation happens when a validator produces more than one block on the same slot. The proof of equivocation are the given distinct headers that were signed by the validator and which include the slot number.
Fields§
§offender: IdReturns the authority id of the equivocator.
slot: SlotThe slot at which the equivocation happened.
first_header: HeaderThe first header involved in the equivocation.
second_header: HeaderThe second header involved in the equivocation.
Trait Implementations§
Source§impl<Header: Clone, Id: Clone> Clone for EquivocationProof<Header, Id>
impl<Header: Clone, Id: Clone> Clone for EquivocationProof<Header, Id>
Source§fn clone(&self) -> EquivocationProof<Header, Id>
fn clone(&self) -> EquivocationProof<Header, Id>
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<Header, Id> Decode for EquivocationProof<Header, Id>
impl<Header, Id> Decode for EquivocationProof<Header, Id>
Source§impl<Header, Id> Encode for EquivocationProof<Header, Id>
impl<Header, Id> Encode for EquivocationProof<Header, Id>
Source§fn encode_to<__CodecOutputEdqy: Output + ?Sized>(
&self,
__codec_dest_edqy: &mut __CodecOutputEdqy,
)
fn encode_to<__CodecOutputEdqy: Output + ?Sized>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
Convert self to a slice and append it to the destination.
Source§fn size_hint(&self) -> usize
fn size_hint(&self) -> usize
If possible give a hint of expected size of the encoding. Read more
Source§fn using_encoded<R, F>(&self, f: F) -> R
fn using_encoded<R, F>(&self, f: F) -> R
Convert self to a slice and then invoke the given closure with it.
Source§fn encoded_size(&self) -> usize
fn encoded_size(&self) -> usize
Calculates the encoded size. Read more
Source§impl<Header: PartialEq, Id: PartialEq> PartialEq for EquivocationProof<Header, Id>
impl<Header: PartialEq, Id: PartialEq> PartialEq for EquivocationProof<Header, Id>
Source§fn eq(&self, other: &EquivocationProof<Header, Id>) -> bool
fn eq(&self, other: &EquivocationProof<Header, Id>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<Header, Id> EncodeLike for EquivocationProof<Header, Id>
impl<Header, Id> StructuralPartialEq for EquivocationProof<Header, Id>
Auto Trait Implementations§
impl<Header, Id> Freeze for EquivocationProof<Header, Id>
impl<Header, Id> RefUnwindSafe for EquivocationProof<Header, Id>where
Id: RefUnwindSafe,
Header: RefUnwindSafe,
impl<Header, Id> Send for EquivocationProof<Header, Id>
impl<Header, Id> Sync for EquivocationProof<Header, Id>
impl<Header, Id> Unpin for EquivocationProof<Header, Id>
impl<Header, Id> UnwindSafe for EquivocationProof<Header, Id>where
Id: UnwindSafe,
Header: UnwindSafe,
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