pub struct HardForkSwitchBuilder {
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
Builder for HardForkSwitch
.
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
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0028(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0028(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0028.
sourcepub fn disable_rfc_0028(self) -> Self
pub fn disable_rfc_0028(self) -> Self
Never enable the RFC PR 0028.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0029(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0029(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0029.
sourcepub fn disable_rfc_0029(self) -> Self
pub fn disable_rfc_0029(self) -> Self
Never enable the RFC PR 0029.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0030(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0030(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0030.
sourcepub fn disable_rfc_0030(self) -> Self
pub fn disable_rfc_0030(self) -> Self
Never enable the RFC PR 0030.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0031(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0031(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0031.
sourcepub fn disable_rfc_0031(self) -> Self
pub fn disable_rfc_0031(self) -> Self
Never enable the RFC PR 0031.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0032(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0032(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0032.
sourcepub fn disable_rfc_0032(self) -> Self
pub fn disable_rfc_0032(self) -> Self
Never enable the RFC PR 0032.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0036(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0036(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0036.
sourcepub fn disable_rfc_0036(self) -> Self
pub fn disable_rfc_0036(self) -> Self
Never enable the RFC PR 0036.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn rfc_0038(self, epoch_number: EpochNumber) -> Self
pub fn rfc_0038(self, epoch_number: EpochNumber) -> Self
Set the first epoch number of the RFC PR 0038.
sourcepub fn disable_rfc_0038(self) -> Self
pub fn disable_rfc_0038(self) -> Self
Never enable the RFC PR 0038.
sourceimpl HardForkSwitchBuilder
impl HardForkSwitchBuilder
sourcepub fn build(self) -> Result<HardForkSwitch, String>
pub fn build(self) -> Result<HardForkSwitch, String>
Build a new HardForkSwitch
.
Returns an error if failed at any check, for example, there maybe are some features depend on others.
Trait Implementations
sourceimpl Clone for HardForkSwitchBuilder
impl Clone for HardForkSwitchBuilder
sourcefn clone(&self) -> HardForkSwitchBuilder
fn clone(&self) -> HardForkSwitchBuilder
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for HardForkSwitchBuilder
impl Debug for HardForkSwitchBuilder
sourceimpl Default for HardForkSwitchBuilder
impl Default for HardForkSwitchBuilder
sourcefn default() -> HardForkSwitchBuilder
fn default() -> HardForkSwitchBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for HardForkSwitchBuilder
impl Send for HardForkSwitchBuilder
impl Sync for HardForkSwitchBuilder
impl Unpin for HardForkSwitchBuilder
impl UnwindSafe for HardForkSwitchBuilder
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more