Struct ckb_chain_spec::Params
source · [−]pub struct Params {
pub initial_primary_epoch_reward: Option<Capacity>,
pub secondary_epoch_reward: Option<Capacity>,
pub max_block_cycles: Option<Cycle>,
pub max_block_bytes: Option<u64>,
pub cellbase_maturity: Option<u64>,
pub primary_epoch_reward_halving_interval: Option<EpochNumber>,
pub epoch_duration_target: Option<u64>,
pub genesis_epoch_length: Option<BlockNumber>,
pub permanent_difficulty_in_dummy: Option<bool>,
pub max_block_proposals_limit: Option<u64>,
pub orphan_rate_target: Option<(u32, u32)>,
pub hardfork: Option<HardForkConfig>,
}Expand description
Parameters for CKB block chain
Fields
initial_primary_epoch_reward: Option<Capacity>The initial_primary_epoch_reward
secondary_epoch_reward: Option<Capacity>The secondary_epoch_reward
max_block_cycles: Option<Cycle>The max_block_cycles
See max_block_cycles
max_block_bytes: Option<u64>The max_block_bytes
See max_block_bytes
cellbase_maturity: Option<u64>The cellbase_maturity
primary_epoch_reward_halving_interval: Option<EpochNumber>The primary_epoch_reward_halving_interval
epoch_duration_target: Option<u64>The epoch_duration_target
genesis_epoch_length: Option<BlockNumber>The genesis_epoch_length
permanent_difficulty_in_dummy: Option<bool>The permanent_difficulty_in_dummy
max_block_proposals_limit: Option<u64>The max_block_proposals_limit
orphan_rate_target: Option<(u32, u32)>The orphan_rate_target
hardfork: Option<HardForkConfig>The parameters for hard fork features.
See hardfork_switch
Implementations
sourceimpl Params
impl Params
sourcepub fn initial_primary_epoch_reward(&self) -> Capacity
pub fn initial_primary_epoch_reward(&self) -> Capacity
Return the initial_primary_epoch_reward, otherwise if None, returns the default value
sourcepub fn secondary_epoch_reward(&self) -> Capacity
pub fn secondary_epoch_reward(&self) -> Capacity
Return the secondary_epoch_reward, otherwise if None, returns the default value
sourcepub fn max_block_cycles(&self) -> Cycle
pub fn max_block_cycles(&self) -> Cycle
Return the max_block_cycles, otherwise if None, returns the default value
sourcepub fn max_block_bytes(&self) -> u64
pub fn max_block_bytes(&self) -> u64
Return the max_block_bytes, otherwise if None, returns the default value
sourcepub fn cellbase_maturity(&self) -> u64
pub fn cellbase_maturity(&self) -> u64
Return the cellbase_maturity, otherwise if None, returns the default value
sourcepub fn primary_epoch_reward_halving_interval(&self) -> EpochNumber
pub fn primary_epoch_reward_halving_interval(&self) -> EpochNumber
Return the primary_epoch_reward_halving_interval, otherwise if None, returns the default value
sourcepub fn permanent_difficulty_in_dummy(&self) -> bool
pub fn permanent_difficulty_in_dummy(&self) -> bool
Return the permanent_difficulty_in_dummy, otherwise if None, returns the default value
sourcepub fn epoch_duration_target(&self) -> u64
pub fn epoch_duration_target(&self) -> u64
Return the epoch_duration_target, otherwise if None, returns the default value
sourcepub fn genesis_epoch_length(&self) -> BlockNumber
pub fn genesis_epoch_length(&self) -> BlockNumber
Return the genesis_epoch_length, otherwise if None, returns the default value
sourcepub fn max_block_proposals_limit(&self) -> BlockNumber
pub fn max_block_proposals_limit(&self) -> BlockNumber
Return the max_block_proposals_limit, otherwise if None, returns the default value
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Params
impl<'de> Deserialize<'de> for Params
sourcefn 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
impl Eq for Params
impl StructuralEq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more