Struct ckb_chain_spec::HardForkConfig [−][src]
pub struct HardForkConfig {
pub rfc_0028: Option<EpochNumber>,
pub rfc_0029: Option<EpochNumber>,
pub rfc_0030: Option<EpochNumber>,
pub rfc_0031: Option<EpochNumber>,
pub rfc_0032: Option<EpochNumber>,
pub rfc_0036: Option<EpochNumber>,
pub rfc_0038: Option<EpochNumber>,
}Expand description
Hard forks parameters for spec.
Fields
rfc_0028: Option<EpochNumber>Use input cell committing block timestamp as the start time for the relative timestamp in since.
Ref: CKB RFC 0028
rfc_0029: Option<EpochNumber>Allow Multiple Cell Dep Matches When There Is No Ambiguity.
Ref: CKB RFC 0029
rfc_0030: Option<EpochNumber>Ensure That Index Is Less Than Length In the Input Since Field Using Epoch With Fraction.
Ref: CKB RFC 0030
rfc_0031: Option<EpochNumber>Add a variable length field in the block: reuse uncles_hash in the header as extra_hash.
Ref: CKB RFC 0031
rfc_0032: Option<EpochNumber>CKB VM Version Selection.
This feature include 4 parts:
- CKB VM Version Selection.
- CKB VM version 1.
- CKB VM Syscalls 2.
- P2P protocol upgrade.
Ref:
rfc_0036: Option<EpochNumber>Remove Header Deps Immature Rule.
Ref: CKB RFC 0036
rfc_0038: Option<EpochNumber>Disallow over the max dep expansion limit.
Ref: CKB RFC 0038
Implementations
If all parameters which have been set are correct for mainnet, then
sets all None to default values, otherwise, return an Err.
If all parameters which have been set are correct for testnet, then
sets all None to default values, otherwise, return an Err.
Converts to a hard fork switch.
Enable features which are set to None at the user provided epoch.
Trait Implementations
Returns the “default value” for a type. Read more
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>,
Deserialize this value from the given Serde deserializer. Read more
This method tests for self and other values to be equal, and is used
by ==. Read more
This method tests for !=.
Auto Trait Implementations
impl RefUnwindSafe for HardForkConfig
impl Send for HardForkConfig
impl Sync for HardForkConfig
impl Unpin for HardForkConfig
impl UnwindSafe for HardForkConfig
Blanket Implementations
Mutably borrows from an owned value. Read more