Struct casper_execution_engine::core::engine_state::step::StepRequest
source · pub struct StepRequest {
pub pre_state_hash: Digest,
pub protocol_version: ProtocolVersion,
pub slash_items: Vec<SlashItem>,
pub reward_items: Vec<RewardItem>,
pub evict_items: Vec<EvictItem>,
pub next_era_id: EraId,
pub era_end_timestamp_millis: u64,
}
Expand description
Representation of a step request.
Fields§
§pre_state_hash: Digest
State root hash.
protocol_version: ProtocolVersion
Protocol version for this request.
slash_items: Vec<SlashItem>
List of validators to be slashed.
A slashed validator is removed from the next validator set.
reward_items: Vec<RewardItem>
List of validators that will be rewarded.
evict_items: Vec<EvictItem>
List of validators to be evicted.
Compared to a slashing, evictions are deactivating a given validator, but his stake is unchanged. A further re-activation is possible.
next_era_id: EraId
Specifies which era validators will be returned based on next_era_id
.
Intended use is to always specify the current era id + 1 which will return computed era at the end of this step request.
era_end_timestamp_millis: u64
Timestamp in milliseconds representing end of the current era.
Implementations§
source§impl StepRequest
impl StepRequest
sourcepub fn new(
pre_state_hash: Digest,
protocol_version: ProtocolVersion,
slash_items: Vec<SlashItem>,
reward_items: Vec<RewardItem>,
evict_items: Vec<EvictItem>,
next_era_id: EraId,
era_end_timestamp_millis: u64
) -> Self
pub fn new( pre_state_hash: Digest, protocol_version: ProtocolVersion, slash_items: Vec<SlashItem>, reward_items: Vec<RewardItem>, evict_items: Vec<EvictItem>, next_era_id: EraId, era_end_timestamp_millis: u64 ) -> Self
Creates new step request.
sourcepub fn slashed_validators(&self) -> Vec<PublicKey>
pub fn slashed_validators(&self) -> Vec<PublicKey>
Returns list of slashed validators.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StepRequest
impl Send for StepRequest
impl Sync for StepRequest
impl Unpin for StepRequest
impl UnwindSafe for StepRequest
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.