Struct ckb_jsonrpc_types::EpochView[][src]

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

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

Creates the view from the stored ext.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Deserialize this value from the given Serde deserializer. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.