Struct chain_impl_mockchain::testing::ledger::ConfigBuilder
source · pub struct ConfigBuilder {Show 20 fields
slot_duration: u8,
slots_per_epoch: u32,
active_slots_coeff: Milli,
discrimination: Discrimination,
linear_fee: Option<LinearFee>,
per_certificate_fee: Option<PerCertificateFee>,
per_vote_certificate_fee: Option<PerVoteCertificateFee>,
leaders: Vec<BftLeaderId>,
committees_ids: Vec<CommitteeId>,
rewards: Value,
treasury: Value,
fees_in_treasury: bool,
treasury_params: TaxType,
reward_params: RewardParams,
block_content_max_size: Option<u32>,
kes_update_speed: u32,
block0_date: Block0Date,
consensus_version: ConsensusVersion,
pool_capping_ratio: Ratio,
transaction_max_expiry_epochs: Option<u8>,
}
Fields§
§slot_duration: u8
§slots_per_epoch: u32
§active_slots_coeff: Milli
§discrimination: Discrimination
§linear_fee: Option<LinearFee>
§per_certificate_fee: Option<PerCertificateFee>
§per_vote_certificate_fee: Option<PerVoteCertificateFee>
§leaders: Vec<BftLeaderId>
§committees_ids: Vec<CommitteeId>
§rewards: Value
§treasury: Value
§fees_in_treasury: bool
§treasury_params: TaxType
§reward_params: RewardParams
§block_content_max_size: Option<u32>
§kes_update_speed: u32
§block0_date: Block0Date
§consensus_version: ConsensusVersion
§pool_capping_ratio: Ratio
§transaction_max_expiry_epochs: Option<u8>
Implementations§
source§impl ConfigBuilder
impl ConfigBuilder
pub fn new() -> Self
pub fn with_committee_id(self, committee_id: CommitteeId) -> Self
pub fn with_rewards(self, value: Value) -> Self
pub fn with_treasury(self, value: Value) -> Self
pub fn with_fees_in_treasury(self) -> Self
pub fn with_pool_reward_participation_caping( self, numerator: u64, denominator: u64 ) -> Self
pub fn with_treasury_params(self, tax_type: TaxType) -> Self
pub fn with_rewards_params(self, reward_params: RewardParams) -> Self
pub fn with_discrimination(self, discrimination: Discrimination) -> Self
pub fn with_slot_duration(self, slot_duration: u8) -> Self
pub fn with_leaders(self, leaders: &[BftLeaderId]) -> Self
pub fn with_fee(self, linear_fee: LinearFee) -> Self
pub fn with_per_certificate_fee( self, per_certificate_fee: PerCertificateFee ) -> Self
pub fn with_per_vote_certificate_fee( self, per_vote_certificate_fee: PerVoteCertificateFee ) -> Self
pub fn with_slots_per_epoch(self, slots_per_epoch: u32) -> Self
pub fn with_active_slots_coeff(self, active_slots_coeff: Milli) -> Self
pub fn with_block_content_max_size(self, block_content_max_size: u32) -> Self
pub fn with_kes_update_speed(self, kes_update_speed: u32) -> Self
pub fn with_block0_date(self, block0_date: Block0Date) -> Self
pub fn with_consensus_version(self, consensus_version: ConsensusType) -> Self
pub fn with_transaction_max_expiry_epochs(self, n_epochs: u8) -> Self
fn create_single_bft_leader() -> BftLeaderId
pub fn normalize(&mut self)
pub fn build(self) -> ConfigParams
Trait Implementations§
source§impl Arbitrary for ConfigBuilder
impl Arbitrary for ConfigBuilder
source§impl Clone for ConfigBuilder
impl Clone for ConfigBuilder
source§fn clone(&self) -> ConfigBuilder
fn clone(&self) -> ConfigBuilder
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 moreAuto Trait Implementations§
impl RefUnwindSafe for ConfigBuilder
impl Send for ConfigBuilder
impl Sync for ConfigBuilder
impl Unpin for ConfigBuilder
impl UnwindSafe for ConfigBuilder
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