Struct near_chain::types::Tip[][src]

pub struct Tip {
    pub height: u64,
    pub last_block_hash: CryptoHash,
    pub prev_block_hash: CryptoHash,
    pub epoch_id: EpochId,
    pub next_epoch_id: EpochId,
}
Expand description

The tip of a fork. A handle to the fork ancestry from its leaf in the blockchain tree. References the max height and the latest and previous blocks for convenience

Fields

height: u64

Height of the tip (max height of the fork)

last_block_hash: CryptoHash

Last block pushed to the fork

prev_block_hash: CryptoHash

Previous block

epoch_id: EpochId

Current epoch id. Used for getting validator info.

next_epoch_id: EpochId

Next epoch id.

Implementations

Creates a new tip based on provided header.

Trait Implementations

Deserializes this instance from a given slice of bytes. Updates the buffer to point at the remaining bytes. Read more

Deserialize this instance from a slice of bytes.

Serialize this instance into a vector of bytes.

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more