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
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Params
impl<'de> Deserialize<'de> for Params
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>,
impl Eq for Params
impl StructuralPartialEq for Params
Auto Trait Implementations§
impl Freeze for Params
impl RefUnwindSafe for Params
impl Send for Params
impl Sync for Params
impl Unpin for Params
impl UnwindSafe for Params
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)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