pub struct PartitionedEpochRewardsConfig {
pub reward_calculation_num_blocks: Slot,
pub stake_account_stores_per_block: Slot,
pub test_enable_partitioned_rewards: bool,
pub test_compare_partitioned_epoch_rewards: bool,
}
Expand description
Configuration options for partitioned epoch rewards. This struct allows various forms of testing, especially prior to feature activation.
Fields§
§reward_calculation_num_blocks: Slot
Number of blocks for reward calculation and storing vote accounts. Distributing rewards to stake accounts begins AFTER this many blocks. Normally, this will be 1. if force_one_slot_partitioned_rewards, this will be 0 (ie. we take 0 blocks just for reward calculation)
stake_account_stores_per_block: Slot
number of stake accounts to store in one block during partitioned reward interval normally, this is a number tuned for reasonable performance, such as 4096 accounts/block if force_one_slot_partitioned_rewards, this will usually be u64::MAX so that all stake accounts are written in the first block
test_enable_partitioned_rewards: bool
if true, end of epoch bank rewards will force using partitioned rewards distribution.
see set_test_enable_partitioned_rewards
test_compare_partitioned_epoch_rewards: bool
if true, end of epoch non-partitioned bank rewards will test the partitioned rewards distribution vote and stake accounts This has a significant performance impact on the first slot in each new epoch.
Implementations§
source§impl PartitionedEpochRewardsConfig
impl PartitionedEpochRewardsConfig
pub fn new(test: TestPartitionedEpochRewards) -> Self
Trait Implementations§
Auto Trait Implementations§
impl Freeze for PartitionedEpochRewardsConfig
impl RefUnwindSafe for PartitionedEpochRewardsConfig
impl Send for PartitionedEpochRewardsConfig
impl Sync for PartitionedEpochRewardsConfig
impl Unpin for PartitionedEpochRewardsConfig
impl UnwindSafe for PartitionedEpochRewardsConfig
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more