referrerpolicy=no-referrer-when-downgrade
sp_consensus_babe

Type Alias EquivocationProof

Source
pub type EquivocationProof<H> = EquivocationProof<H, AuthorityId>;
Expand description

An equivocation proof for multiple block authorships on the same slot (i.e. double vote).

Aliased Type§

struct EquivocationProof<H> {
    pub offender: Public,
    pub slot: Slot,
    pub first_header: H,
    pub second_header: H,
}

Fields§

§offender: Public

Returns the authority id of the equivocator.

§slot: Slot

The slot at which the equivocation happened.

§first_header: H

The first header involved in the equivocation.

§second_header: H

The second header involved in the equivocation.

Trait Implementations

Source§

impl<Header, Id> Clone for EquivocationProof<Header, Id>
where Header: Clone, Id: Clone,

Source§

fn clone(&self) -> EquivocationProof<Header, Id>

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<Header, Id> Debug for EquivocationProof<Header, Id>
where Header: Debug, Id: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl<Header, Id> Decode for EquivocationProof<Header, Id>
where Id: Decode, Header: Decode,

Source§

fn decode<__CodecInputEdqy>( __codec_input_edqy: &mut __CodecInputEdqy, ) -> Result<EquivocationProof<Header, Id>, Error>
where __CodecInputEdqy: Input,

Attempt to deserialise the value from input.
§

fn decode_into<I>( input: &mut I, dst: &mut MaybeUninit<Self>, ) -> Result<DecodeFinished, Error>
where I: Input,

Attempt to deserialize the value from input into a pre-allocated piece of memory. Read more
§

fn skip<I>(input: &mut I) -> Result<(), Error>
where I: Input,

Attempt to skip the encoded value from input. Read more
§

fn encoded_fixed_size() -> Option<usize>

Returns the fixed encoded size of the type. Read more
Source§

impl<Header, Id> Encode for EquivocationProof<Header, Id>
where Id: Encode, Header: Encode,

Source§

fn size_hint(&self) -> usize

If possible give a hint of expected size of the encoding. Read more
Source§

fn encode_to<__CodecOutputEdqy>( &self, __codec_dest_edqy: &mut __CodecOutputEdqy, )
where __CodecOutputEdqy: Output + ?Sized,

Convert self to a slice and append it to the destination.
§

fn encode(&self) -> Vec<u8>

Convert self to an owned vector.
§

fn using_encoded<R, F>(&self, f: F) -> R
where F: FnOnce(&[u8]) -> R,

Convert self to a slice and then invoke the given closure with it.
§

fn encoded_size(&self) -> usize

Calculates the encoded size. Read more
Source§

impl<Header, Id> PartialEq for EquivocationProof<Header, Id>
where Header: PartialEq, Id: PartialEq,

Source§

fn eq(&self, other: &EquivocationProof<Header, Id>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<Header, Id> TypeInfo for EquivocationProof<Header, Id>
where Id: TypeInfo + 'static, Header: TypeInfo + 'static,

Source§

type Identity = EquivocationProof<Header, Id>

The type identifying for which type info is provided. Read more
Source§

fn type_info() -> Type

Returns the static type identifier for Self.
Source§

impl<Header, Id> DecodeWithMemTracking for EquivocationProof<Header, Id>
where Id: DecodeWithMemTracking, Header: DecodeWithMemTracking,

Source§

impl<Header, Id> EncodeLike for EquivocationProof<Header, Id>
where Id: Encode, Header: Encode,

Source§

impl<Header, Id> Eq for EquivocationProof<Header, Id>
where Header: Eq, Id: Eq,

Source§

impl<Header, Id> StructuralPartialEq for EquivocationProof<Header, Id>