pub struct CKB2023 { /* private fields */ }
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 CKB2023Builder
.
Implementations§
source§impl CKB2023
impl CKB2023
sourcepub fn new_builder() -> CKB2023Builder
pub fn new_builder() -> CKB2023Builder
Creates a new builder to build an instance.
sourcepub fn as_builder(&self) -> CKB2023Builder
pub fn as_builder(&self) -> CKB2023Builder
Creates a new builder based on the current instance.
sourcepub fn new_mirana() -> Self
pub fn new_mirana() -> Self
Creates a new mirana instance.
sourcepub fn new_dev_default() -> Self
pub fn new_dev_default() -> Self
Creates a new dev instance.
sourcepub fn new_with_specified(epoch: EpochNumber) -> Self
pub fn new_with_specified(epoch: EpochNumber) -> Self
Creates a new instance with specified.
source§impl CKB2023
impl CKB2023
sourcepub fn rfc_0048(&self) -> EpochNumber
pub fn rfc_0048(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0048 is enabled.
sourcepub fn remove_header_version_reservation_rule(&self) -> EpochNumber
pub fn remove_header_version_reservation_rule(&self) -> EpochNumber
An alias for the method rfc_0048(&self) to let the code to be more readable.
sourcepub fn is_remove_header_version_reservation_rule_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_remove_header_version_reservation_rule_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0048 is enabled at the provided epoch.
source§impl CKB2023
impl CKB2023
sourcepub fn rfc_0049(&self) -> EpochNumber
pub fn rfc_0049(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0049 is enabled.
sourcepub fn vm_version_2_and_syscalls_3(&self) -> EpochNumber
pub fn vm_version_2_and_syscalls_3(&self) -> EpochNumber
An alias for the method rfc_0049(&self) to let the code to be more readable.
sourcepub fn is_vm_version_2_and_syscalls_3_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_vm_version_2_and_syscalls_3_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0049 is enabled at the provided epoch.