Struct ckb_types::core::hardfork::HardForkSwitch[][src]

pub struct HardForkSwitch { /* fields omitted */ }
Expand description

A switch to select hard fork features base on the epoch number.

For safety, all fields are private and not allowed to update. This structure can only be constructed by HardForkSwitchBuilder.

Implementations

Creates a new builder to build an instance.

Creates a new builder based on the current instance.

Creates a new instance that all hard fork features are disabled forever.

Returns a vector of epoch numbers, and there are new features which require refrese tx-pool caches will be enabled at those epochs.

Return the first epoch number when the RFC PR 0028 is enabled.

An alias for the method rfc_0028(&self) to let the code to be more readable.

If the RFC PR 0028 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0029 is enabled.

An alias for the method rfc_0029(&self) to let the code to be more readable.

If the RFC PR 0029 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0030 is enabled.

An alias for the method rfc_0030(&self) to let the code to be more readable.

If the RFC PR 0030 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0031 is enabled.

An alias for the method rfc_0031(&self) to let the code to be more readable.

If the RFC PR 0031 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0032 is enabled.

An alias for the method rfc_0032(&self) to let the code to be more readable.

If the RFC PR 0032 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0036 is enabled.

An alias for the method rfc_0036(&self) to let the code to be more readable.

If the RFC PR 0036 is enabled at the provided epoch.

Return the first epoch number when the RFC PR 0038 is enabled.

An alias for the method rfc_0038(&self) to let the code to be more readable.

If the RFC PR 0038 is enabled at the provided epoch.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.