Struct ckb_jsonrpc_types::EpochView[][src]

pub struct EpochView {
    pub number: EpochNumber,
    pub start_number: BlockNumber,
    pub length: BlockNumber,
    pub compact_target: Uint32,
}

JSON view of an epoch.

CKB adjusts difficulty based on epochs.

Examples

{
  "compact_target": "0x1e083126",
  "length": "0x708",
  "number": "0x1",
  "start_number": "0x3e8"
}

Fields

number: EpochNumber

Consecutive epoch number starting from 0.

start_number: BlockNumber

The block number of the first block in the epoch.

It also equals the total count of blocks in all the epochs which epoch number is less than this epoch.

length: BlockNumber

The number of blocks in this epoch.

compact_target: Uint32

The difficulty target for any block in this epoch.

Implementations

impl EpochView[src]

pub fn from_ext(ext: EpochExt) -> EpochView[src]

Creates the view from the stored ext.

Trait Implementations

impl Clone for EpochView[src]

impl Debug for EpochView[src]

impl Default for EpochView[src]

impl<'de> Deserialize<'de> for EpochView[src]

impl Eq for EpochView[src]

impl Hash for EpochView[src]

impl PartialEq<EpochView> for EpochView[src]

impl Serialize for EpochView[src]

impl StructuralEq for EpochView[src]

impl StructuralPartialEq for EpochView[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,