pub struct CKB2021 { /* 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 CKB2021Builder
.
Implementations§
source§impl CKB2021
impl CKB2021
sourcepub fn new_builder() -> CKB2021Builder
pub fn new_builder() -> CKB2021Builder
Creates a new builder to build an instance.
sourcepub fn as_builder(&self) -> CKB2021Builder
pub fn as_builder(&self) -> CKB2021Builder
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 script_result_changed_at(&self) -> Vec<EpochNumber>
pub fn script_result_changed_at(&self) -> Vec<EpochNumber>
Returns a vector of epoch numbers, and there are new features which require refresh tx-pool caches will be enabled at those epochs.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0028(&self) -> EpochNumber
pub fn rfc_0028(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0028 is enabled.
sourcepub fn block_ts_as_relative_since_start(&self) -> EpochNumber
pub fn block_ts_as_relative_since_start(&self) -> EpochNumber
An alias for the method rfc_0028(&self) to let the code to be more readable.
sourcepub fn is_block_ts_as_relative_since_start_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_block_ts_as_relative_since_start_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0028 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0029(&self) -> EpochNumber
pub fn rfc_0029(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0029 is enabled.
sourcepub fn allow_multiple_matches_on_identical_data(&self) -> EpochNumber
pub fn allow_multiple_matches_on_identical_data(&self) -> EpochNumber
An alias for the method rfc_0029(&self) to let the code to be more readable.
sourcepub fn is_allow_multiple_matches_on_identical_data_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_allow_multiple_matches_on_identical_data_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0029 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0030(&self) -> EpochNumber
pub fn rfc_0030(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0030 is enabled.
sourcepub fn check_length_in_epoch_since(&self) -> EpochNumber
pub fn check_length_in_epoch_since(&self) -> EpochNumber
An alias for the method rfc_0030(&self) to let the code to be more readable.
sourcepub fn is_check_length_in_epoch_since_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_check_length_in_epoch_since_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0030 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0031(&self) -> EpochNumber
pub fn rfc_0031(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0031 is enabled.
sourcepub fn reuse_uncles_hash_as_extra_hash(&self) -> EpochNumber
pub fn reuse_uncles_hash_as_extra_hash(&self) -> EpochNumber
An alias for the method rfc_0031(&self) to let the code to be more readable.
sourcepub fn is_reuse_uncles_hash_as_extra_hash_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_reuse_uncles_hash_as_extra_hash_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0031 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0032(&self) -> EpochNumber
pub fn rfc_0032(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0032 is enabled.
sourcepub fn vm_version_1_and_syscalls_2(&self) -> EpochNumber
pub fn vm_version_1_and_syscalls_2(&self) -> EpochNumber
An alias for the method rfc_0032(&self) to let the code to be more readable.
sourcepub fn is_vm_version_1_and_syscalls_2_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_vm_version_1_and_syscalls_2_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0032 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0036(&self) -> EpochNumber
pub fn rfc_0036(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0036 is enabled.
sourcepub fn remove_header_deps_immature_rule(&self) -> EpochNumber
pub fn remove_header_deps_immature_rule(&self) -> EpochNumber
An alias for the method rfc_0036(&self) to let the code to be more readable.
sourcepub fn is_remove_header_deps_immature_rule_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_remove_header_deps_immature_rule_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0036 is enabled at the provided epoch.
source§impl CKB2021
impl CKB2021
sourcepub fn rfc_0038(&self) -> EpochNumber
pub fn rfc_0038(&self) -> EpochNumber
Return the first epoch number when the RFC PR 0038 is enabled.
sourcepub fn disallow_over_max_dep_expansion_limit(&self) -> EpochNumber
pub fn disallow_over_max_dep_expansion_limit(&self) -> EpochNumber
An alias for the method rfc_0038(&self) to let the code to be more readable.
sourcepub fn is_disallow_over_max_dep_expansion_limit_enabled(
&self,
epoch_number: EpochNumber
) -> bool
pub fn is_disallow_over_max_dep_expansion_limit_enabled( &self, epoch_number: EpochNumber ) -> bool
If the RFC PR 0038 is enabled at the provided epoch.