pub struct ChainConsensusParams {
Show 22 fields pub hash_genesis_block: u256, pub n_subsidy_halving_interval: i32, pub bip16exception: u256, pub bip34height: i32, pub bip34hash: u256, pub bip65height: i32, pub bip66height: i32, pub csv_height: i32, pub segwit_height: i32, pub min_bip9warning_height: i32, pub n_rule_change_activation_threshold: u32, pub n_miner_confirmation_window: u32, pub deployments: Deployments, pub pow_limit: u256, pub pow_allow_min_difficulty_blocks: bool, pub pow_no_retargeting: bool, pub n_pow_target_spacing: i64, pub n_pow_target_timespan: i64, pub n_minimum_chain_work: u256, pub default_assume_valid: u256, pub signet_blocks: bool, pub signet_challenge: Vec<u8>,
}
Expand description

| Parameters that influence chain consensus. |

Fields§

§hash_genesis_block: u256§n_subsidy_halving_interval: i32§bip16exception: u256

| Block hash that is excepted from BIP16 | enforcement |

§bip34height: i32

| Block height and hash at which BIP34 | becomes active |

§bip34hash: u256§bip65height: i32

| Block height at which BIP65 becomes | active |

§bip66height: i32

| Block height at which BIP66 becomes | active |

§csv_height: i32

| Block height at which CSV (BIP68, BIP112 | and BIP113) becomes active |

§segwit_height: i32

| Block height at which Segwit (BIP141, | BIP143 and BIP147) becomes active. | | ———– | @note | | segwit v0 script rules are enforced | on all blocks except the | | BIP 16 exception blocks. |

§min_bip9warning_height: i32

| Don’t warn about unknown BIP 9 activations | below this height. | | This prevents us from warning about | the CSV and segwit activations. |

§n_rule_change_activation_threshold: u32

| Minimum blocks including miner confirmation | of the total of 2016 blocks in a retargeting | period, (nPowTargetTimespan / nPowTargetSpacing) | which is also used for BIP9 deployments. | | Examples: 1916 for 95%, 1512 for testchains. |

§n_miner_confirmation_window: u32§deployments: Deployments§pow_limit: u256

| Proof of work parameters |

§pow_allow_min_difficulty_blocks: bool§pow_no_retargeting: bool§n_pow_target_spacing: i64§n_pow_target_timespan: i64§n_minimum_chain_work: u256

| The best chain should have at least this | much work |

§default_assume_valid: u256

| By default assume that the signatures | in ancestors of this block are valid |

§signet_blocks: bool

| If true, witness commitments contain | a payload equal to a Bitcoin Script solution | to the signet challenge. See BIP325. |

§signet_challenge: Vec<u8>

Implementations§

Trait Implementations§

source§

impl Default for ChainConsensusParams

source§

fn default() -> ChainConsensusParams

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

const: unstable · source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T, U> CastInto<U> for Twhere U: CastFrom<T>,

§

unsafe fn cast_into(self) -> U

Performs the conversion. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

const: unstable · source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = mem::align_of::<T>()

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> StaticUpcast<T> for T

§

unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>

Convert type of a const pointer. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
const: unstable · source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

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

§

fn vzip(self) -> V