pub struct RewardingParams {
pub interval: IntervalRewardParams,
pub rewarded_set_size: u32,
pub active_set_size: u32,
}
Fields§
§interval: IntervalRewardParams
Parameters that should remain unchanged throughout an interval.
rewarded_set_size: u32
§active_set_size: u32
Implementations§
source§impl RewardingParams
impl RewardingParams
pub fn active_node_work(&self) -> Decimal
pub fn standby_node_work(&self) -> Decimal
pub fn dec_rewarded_set_size(&self) -> Decimal
pub fn dec_active_set_size(&self) -> Decimal
pub fn apply_epochs_in_interval_change(&mut self, new_epochs_in_interval: u32)
pub fn try_change_active_set_size( &mut self, new_active_set_size: u32 ) -> Result<(), MixnetContractError>
pub fn try_apply_updates( &mut self, updates: IntervalRewardingParamsUpdate, epochs_in_interval: u32 ) -> Result<(), MixnetContractError>
Trait Implementations§
source§impl Clone for RewardingParams
impl Clone for RewardingParams
source§fn clone(&self) -> RewardingParams
fn clone(&self) -> RewardingParams
Returns a copy 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 RewardingParams
impl Debug for RewardingParams
source§impl<'de> Deserialize<'de> for RewardingParams
impl<'de> Deserialize<'de> for RewardingParams
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for RewardingParams
impl JsonSchema for RewardingParams
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq<RewardingParams> for RewardingParams
impl PartialEq<RewardingParams> for RewardingParams
source§fn eq(&self, other: &RewardingParams) -> bool
fn eq(&self, other: &RewardingParams) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<RewardingParams> for RewardingParams
impl PartialOrd<RewardingParams> for RewardingParams
source§fn partial_cmp(&self, other: &RewardingParams) -> Option<Ordering>
fn partial_cmp(&self, other: &RewardingParams) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for RewardingParams
impl Serialize for RewardingParams
impl Copy for RewardingParams
impl Eq for RewardingParams
impl StructuralEq for RewardingParams
impl StructuralPartialEq for RewardingParams
Auto Trait Implementations§
impl RefUnwindSafe for RewardingParams
impl Send for RewardingParams
impl Sync for RewardingParams
impl Unpin for RewardingParams
impl UnwindSafe for RewardingParams
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