pub struct ChainConfig {
Show 24 fields pub chain_id: u64, pub homestead_block: Option<u64>, pub dao_fork_block: Option<u64>, pub dao_fork_support: bool, pub eip150_block: Option<u64>, pub eip150_hash: Option<H256>, pub eip155_block: Option<u64>, pub eip158_block: Option<u64>, pub byzantium_block: Option<u64>, pub constantinople_block: Option<u64>, pub petersburg_block: Option<u64>, pub istanbul_block: Option<u64>, pub muir_glacier_block: Option<u64>, pub berlin_block: Option<u64>, pub london_block: Option<u64>, pub arrow_glacier_block: Option<u64>, pub gray_glacier_block: Option<u64>, pub merge_netsplit_block: Option<u64>, pub shanghai_time: Option<u64>, pub cancun_time: Option<u64>, pub terminal_total_difficulty: Option<U256>, pub terminal_total_difficulty_passed: bool, pub ethash: Option<EthashConfig>, pub clique: Option<CliqueConfig>,
}
Expand description

Represents a node’s chain configuration.

See geth’s ChainConfig struct for the source of each field.

Fields§

§chain_id: u64

The network’s chain ID.

§homestead_block: Option<u64>

The homestead switch block (None = no fork, 0 = already homestead).

§dao_fork_block: Option<u64>

The DAO fork switch block (None = no fork).

§dao_fork_support: bool

Whether or not the node supports the DAO hard-fork.

§eip150_block: Option<u64>

The EIP-150 hard fork block (None = no fork).

§eip150_hash: Option<H256>

The EIP-150 hard fork hash.

§eip155_block: Option<u64>

The EIP-155 hard fork block.

§eip158_block: Option<u64>

The EIP-158 hard fork block.

§byzantium_block: Option<u64>

The Byzantium hard fork block.

§constantinople_block: Option<u64>

The Constantinople hard fork block.

§petersburg_block: Option<u64>

The Petersburg hard fork block.

§istanbul_block: Option<u64>

The Istanbul hard fork block.

§muir_glacier_block: Option<u64>

The Muir Glacier hard fork block.

§berlin_block: Option<u64>

The Berlin hard fork block.

§london_block: Option<u64>

The London hard fork block.

§arrow_glacier_block: Option<u64>

The Arrow Glacier hard fork block.

§gray_glacier_block: Option<u64>

The Gray Glacier hard fork block.

§merge_netsplit_block: Option<u64>

Virtual fork after the merge to use as a network splitter.

§shanghai_time: Option<u64>

Shanghai switch time.

§cancun_time: Option<u64>

Cancun switch time.

§terminal_total_difficulty: Option<U256>

Total difficulty reached that triggers the merge consensus upgrade.

§terminal_total_difficulty_passed: bool

A flag specifying that the network already passed the terminal total difficulty. Its purpose is to disable legacy sync without having seen the TTD locally.

§ethash: Option<EthashConfig>

Ethash parameters.

§clique: Option<CliqueConfig>

Clique parameters.

Trait Implementations§

source§

impl Clone for ChainConfig

source§

fn clone(&self) -> ChainConfig

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ChainConfig

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for ChainConfig

source§

fn default() -> ChainConfig

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

impl<'de> Deserialize<'de> for ChainConfig

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq for ChainConfig

source§

fn eq(&self, other: &ChainConfig) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for ChainConfig

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Eq for ChainConfig

source§

impl StructuralPartialEq for ChainConfig

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

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.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

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

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
source§

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

Performs the conversion.
source§

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

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> JsonSchemaMaybe for T