[][src]Struct ckb_chain_spec::consensus::Consensus

pub struct Consensus {
    pub id: String,
    pub genesis_block: BlockView,
    pub genesis_hash: Byte32,
    pub dao_type_hash: Option<Byte32>,
    pub secp256k1_blake160_sighash_all_type_hash: Option<Byte32>,
    pub secp256k1_blake160_multisig_all_type_hash: Option<Byte32>,
    pub initial_primary_epoch_reward: Capacity,
    pub secondary_epoch_reward: Capacity,
    pub max_uncles_num: usize,
    pub orphan_rate_target: RationalU256,
    pub epoch_duration_target: u64,
    pub tx_proposal_window: ProposalWindow,
    pub proposer_reward_ratio: Ratio,
    pub pow: Pow,
    pub cellbase_maturity: EpochNumberWithFraction,
    pub median_time_block_count: usize,
    pub max_block_cycles: Cycle,
    pub max_block_bytes: u64,
    pub block_version: Version,
    pub tx_version: Version,
    pub type_id_code_hash: H256,
    pub max_block_proposals_limit: u64,
    pub genesis_epoch_ext: EpochExt,
    pub satoshi_pubkey_hash: H160,
    pub satoshi_cell_occupied_ratio: Ratio,
    pub primary_epoch_reward_halving_interval: EpochNumber,
    pub permanent_difficulty_in_dummy: bool,
    pub min_chain_work: U256,
}

Fields

id: Stringgenesis_block: BlockViewgenesis_hash: Byte32dao_type_hash: Option<Byte32>secp256k1_blake160_sighash_all_type_hash: Option<Byte32>secp256k1_blake160_multisig_all_type_hash: Option<Byte32>initial_primary_epoch_reward: Capacitysecondary_epoch_reward: Capacitymax_uncles_num: usizeorphan_rate_target: RationalU256epoch_duration_target: u64tx_proposal_window: ProposalWindowproposer_reward_ratio: Ratiopow: Powcellbase_maturity: EpochNumberWithFractionmedian_time_block_count: usizemax_block_cycles: Cyclemax_block_bytes: u64block_version: Versiontx_version: Versiontype_id_code_hash: H256max_block_proposals_limit: u64genesis_epoch_ext: EpochExtsatoshi_pubkey_hash: H160satoshi_cell_occupied_ratio: Ratioprimary_epoch_reward_halving_interval: EpochNumberpermanent_difficulty_in_dummy: boolmin_chain_work: U256

Implementations

impl Consensus[src]

pub fn genesis_block(&self) -> &BlockView[src]

pub fn proposer_reward_ratio(&self) -> Ratio[src]

pub fn finalization_delay_length(&self) -> BlockNumber[src]

pub fn finalize_target(&self, block_number: BlockNumber) -> Option<BlockNumber>[src]

pub fn genesis_hash(&self) -> Byte32[src]

pub fn dao_type_hash(&self) -> Option<Byte32>[src]

pub fn secp256k1_blake160_sighash_all_type_hash(&self) -> Option<Byte32>[src]

pub fn secp256k1_blake160_multisig_all_type_hash(&self) -> Option<Byte32>[src]

pub fn max_uncles_num(&self) -> usize[src]

pub fn min_difficulty(&self) -> U256[src]

pub fn initial_primary_epoch_reward(&self) -> Capacity[src]

pub fn primary_epoch_reward(&self, epoch_number: u64) -> Capacity[src]

pub fn primary_epoch_reward_halving_interval(&self) -> EpochNumber[src]

pub fn epoch_duration_target(&self) -> u64[src]

pub fn genesis_epoch_ext(&self) -> &EpochExt[src]

pub fn max_epoch_length(&self) -> BlockNumber[src]

pub fn min_epoch_length(&self) -> BlockNumber[src]

pub fn secondary_epoch_reward(&self) -> Capacity[src]

pub fn orphan_rate_target(&self) -> &RationalU256[src]

pub fn pow_engine(&self) -> Arc<dyn PowEngine>[src]

pub fn permanent_difficulty(&self) -> bool[src]

pub fn cellbase_maturity(&self) -> EpochNumberWithFraction[src]

pub fn median_time_block_count(&self) -> usize[src]

pub fn max_block_cycles(&self) -> Cycle[src]

pub fn max_block_bytes(&self) -> u64[src]

pub fn max_block_proposals_limit(&self) -> u64[src]

pub fn block_version(&self) -> Version[src]

pub fn tx_version(&self) -> Version[src]

pub fn type_id_code_hash(&self) -> &H256[src]

pub fn tx_proposal_window(&self) -> ProposalWindow[src]

pub fn bounding_hash_rate(
    &self,
    last_epoch_hash_rate: U256,
    last_epoch_previous_hash_rate: U256
) -> U256
[src]

pub fn bounding_epoch_length(
    &self,
    length: BlockNumber,
    last_epoch_length: BlockNumber
) -> (BlockNumber, bool)
[src]

pub fn next_epoch_ext<A, B>(
    &self,
    last_epoch: &EpochExt,
    header: &HeaderView,
    get_block_header: A,
    total_uncles_count: B
) -> Option<EpochExt> where
    A: Fn(&Byte32) -> Option<HeaderView>,
    B: Fn(&Byte32) -> Option<u64>, 
[src]

pub fn identify_name(&self) -> String[src]

pub fn get_secp_type_script_hash(&self) -> Byte32[src]

Trait Implementations

impl Clone for Consensus[src]

impl Debug for Consensus[src]

impl Default for Consensus[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> AsAny for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,