pub struct LeaderProposalHistory {
pub gap_round_leaders: Vec<u8>,
pub current_leader: u8,
pub is_fallback: bool,
}
Fields§
§gap_round_leaders: Vec<u8>
The validators which were leaders of the “gap” rounds (i.e. those that were not reported to
the consensus manager since the previous call; see ConsensusManagerNextRoundInput::round
).
This list will contain exactly current_call.round - previous_call.round - 1
elements; in
theory, this makes ConsensusManagerNextRoundInput::round
field redundant (i.e. computable),
but this relation can be used for an extra consistency check.
The validators on this list should be penalized during emissions at the end of the current
epoch.
current_leader: u8
The leader of the current round.
is_fallback: bool
Whether the current round was conducted in a “fallback” mode (i.e. indicating a fault
of the current leader).
When true
, the current_leader
should be penalized during emissions in the same way as
gap_round_leaders
.
When false
, the current_leader
is considered to have made this round’s proposal
successfully.
Trait Implementations§
source§impl<X> Categorize<X> for LeaderProposalHistorywhere
X: CustomValueKind,
impl<X> Categorize<X> for LeaderProposalHistorywhere
X: CustomValueKind,
fn value_kind() -> ValueKind<X>
source§impl Clone for LeaderProposalHistory
impl Clone for LeaderProposalHistory
source§fn clone(&self) -> LeaderProposalHistory
fn clone(&self) -> LeaderProposalHistory
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LeaderProposalHistory
impl Debug for LeaderProposalHistory
source§impl<D, X> Decode<X, D> for LeaderProposalHistorywhere
D: Decoder<X>,
X: CustomValueKind,
impl<D, X> Decode<X, D> for LeaderProposalHistorywhere
D: Decoder<X>,
X: CustomValueKind,
source§fn decode_body_with_value_kind(
decoder: &mut D,
value_kind: ValueKind<X>
) -> Result<LeaderProposalHistory, DecodeError>
fn decode_body_with_value_kind( decoder: &mut D, value_kind: ValueKind<X> ) -> Result<LeaderProposalHistory, DecodeError>
source§impl<C> Describe<C> for LeaderProposalHistorywhere
C: CustomTypeKind<RustTypeId>,
impl<C> Describe<C> for LeaderProposalHistorywhere
C: CustomTypeKind<RustTypeId>,
source§const TYPE_ID: RustTypeId = _
const TYPE_ID: RustTypeId = _
TYPE_ID
should give a unique identifier for its SBOR schema type.
An SBOR schema type capture details about the SBOR payload, how it should be interpreted, validated and displayed. Read moresource§fn type_data() -> TypeData<C, RustTypeId>
fn type_data() -> TypeData<C, RustTypeId>
source§fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)
fn add_all_dependencies(aggregator: &mut TypeAggregator<C>)
get_local_type_data
, we need to ensure that the type and all of its own references
get added to the aggregator. Read moresource§impl<E, X> Encode<X, E> for LeaderProposalHistorywhere
E: Encoder<X>,
X: CustomValueKind,
impl<E, X> Encode<X, E> for LeaderProposalHistorywhere
E: Encoder<X>,
X: CustomValueKind,
source§fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_value_kind(&self, encoder: &mut E) -> Result<(), EncodeError>
source§fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
fn encode_body(&self, encoder: &mut E) -> Result<(), EncodeError>
source§impl PartialEq for LeaderProposalHistory
impl PartialEq for LeaderProposalHistory
source§fn eq(&self, other: &LeaderProposalHistory) -> bool
fn eq(&self, other: &LeaderProposalHistory) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl<X> SborTuple<X> for LeaderProposalHistorywhere
X: CustomValueKind,
impl<X> SborTuple<X> for LeaderProposalHistorywhere
X: CustomValueKind,
fn get_length(&self) -> usize
impl Eq for LeaderProposalHistory
impl StructuralPartialEq for LeaderProposalHistory
Auto Trait Implementations§
impl RefUnwindSafe for LeaderProposalHistory
impl Send for LeaderProposalHistory
impl Sync for LeaderProposalHistory
impl Unpin for LeaderProposalHistory
impl UnwindSafe for LeaderProposalHistory
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self
to type T
. The semantics of numeric casting with the as
operator are followed, so <T as As>::as_::<U>
can be used in the same way as T as U
for numeric conversions. Read moresource§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
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.