Struct ckb_chain_spec::Params
source · pub struct Params {Show 13 fields
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 starting_block_limiting_dao_withdrawing_lock: Option<u64>,
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
starting_block_limiting_dao_withdrawing_lock: Option<u64>
The starting_block_limiting_dao_withdrawing_lock.
hardfork: Option<HardForkConfig>
The parameters for hard fork features.
See hardfork_switch
Implementations§
source§impl 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
sourcepub fn orphan_rate_target(&self) -> (u32, u32)
pub fn orphan_rate_target(&self) -> (u32, u32)
Return the orphan_rate_target
, otherwise if None, returns the default value
sourcepub fn starting_block_limiting_dao_withdrawing_lock(&self) -> u64
pub fn starting_block_limiting_dao_withdrawing_lock(&self) -> u64
Return the starting_block_limiting_dao_withdrawing_lock
, otherwise if None, returns the default value