Struct hersir::config::BlockchainConfiguration
source · pub struct BlockchainConfiguration {Show 13 fields
block0_date: SecondsSinceUnixEpoch,
block_content_max_size: BlockContentMaxSize,
consensus: ConsensusVersion,
consensus_genesis_praos_active_slot_coeff: ActiveSlotCoefficient,
discrimination: Discrimination,
committees: Vec<CommitteeIdDef>,
external_consensus_leader_ids: Vec<ConsensusLeaderId>,
kes_update_speed: KesUpdateSpeed,
leaders: Vec<NodeAlias>,
linear_fee: LinearFee,
slot_duration: SlotDuration,
slots_per_epoch: NumberOfSlotsPerEpoch,
tx_max_expiry_epochs: Option<u8>,
}
Fields§
§block0_date: SecondsSinceUnixEpoch
§block_content_max_size: BlockContentMaxSize
§consensus: ConsensusVersion
§consensus_genesis_praos_active_slot_coeff: ActiveSlotCoefficient
§discrimination: Discrimination
§committees: Vec<CommitteeIdDef>
§external_consensus_leader_ids: Vec<ConsensusLeaderId>
§kes_update_speed: KesUpdateSpeed
§leaders: Vec<NodeAlias>
§linear_fee: LinearFee
§slot_duration: SlotDuration
§slots_per_epoch: NumberOfSlotsPerEpoch
§tx_max_expiry_epochs: Option<u8>
Implementations§
source§impl BlockchainConfiguration
impl BlockchainConfiguration
pub fn block0_date(&self) -> SecondsSinceUnixEpoch
pub fn with_block0_date(self, block0_date: SecondsSinceUnixEpoch) -> Self
pub fn block_content_max_size(&self) -> &BlockContentMaxSize
pub fn with_block_content_max_size( self, block_content_max_size: BlockContentMaxSize ) -> Self
pub fn consensus(&self) -> &ConsensusVersion
pub fn with_consensus(self, consensus: ConsensusVersion) -> Self
pub fn consensus_genesis_praos_active_slot_coeff( &self ) -> &ActiveSlotCoefficient
pub fn with_consensus_genesis_praos_active_slot_coeff( self, coeff: ActiveSlotCoefficient ) -> Self
pub fn discrimination(&self) -> Discrimination
pub fn with_discrimination(self, discrimination: Discrimination) -> Self
pub fn committees(&self) -> Vec<CommitteeIdDef>
pub fn with_committees(self, committees: Vec<CommitteeIdDef>) -> Self
pub fn with_committee(self, committee: CommitteeIdDef) -> Self
pub fn external_consensus_leader_ids(&self) -> Vec<ConsensusLeaderId>
pub fn with_external_consensus_leader_ids( self, external_consensus_leader_ids: Vec<ConsensusLeaderId> ) -> Self
pub fn has_external_consensus_leader_ids(&self) -> bool
pub fn kes_update_speed(&self) -> &KesUpdateSpeed
pub fn leaders(&self) -> impl Iterator<Item = &NodeAlias>
pub fn with_leader<S: Into<NodeAlias>>(self, alias: S) -> Self
pub fn with_leaders<S: Into<NodeAlias>>(self, aliases: Vec<S>) -> Self
pub fn linear_fee(&self) -> LinearFee
pub fn with_linear_fee(self, linear_fee: LinearFee) -> Self
pub fn slot_duration(&self) -> &SlotDuration
pub fn with_slot_duration(self, slot_duration: SlotDuration) -> Self
pub fn slots_per_epoch(&self) -> &NumberOfSlotsPerEpoch
pub fn with_slots_per_epoch( self, slots_per_epoch: NumberOfSlotsPerEpoch ) -> Self
pub fn tx_max_expiry_epochs(&self) -> Option<u8>
pub fn with_tx_max_expiry_epochs(self, tx_max_expiry_epochs: Option<u8>) -> Self
Trait Implementations§
source§impl Clone for BlockchainConfiguration
impl Clone for BlockchainConfiguration
source§fn clone(&self) -> BlockchainConfiguration
fn clone(&self) -> BlockchainConfiguration
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 BlockchainConfiguration
impl Debug for BlockchainConfiguration
source§impl Default for BlockchainConfiguration
impl Default for BlockchainConfiguration
source§impl<'de> Deserialize<'de> for BlockchainConfiguration
impl<'de> Deserialize<'de> for BlockchainConfiguration
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
Auto Trait Implementations§
impl RefUnwindSafe for BlockchainConfiguration
impl Send for BlockchainConfiguration
impl Sync for BlockchainConfiguration
impl Unpin for BlockchainConfiguration
impl UnwindSafe for BlockchainConfiguration
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> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request