[][src]Enum grin_chain::types::BlockStatus

pub enum BlockStatus {
    Next {
        prev: Tip,
    },
    Fork {
        prev: Tip,
        head: Tip,
        fork_point: Tip,
    },
    Reorg {
        prev: Tip,
        prev_head: Tip,
        fork_point: Tip,
    },
}

Status of an accepted block.

Variants

Next

Block is the "next" block, updating the chain head.

Fields of Next

prev: Tip

Previous block (previous chain head).

Fork

Block does not update the chain head and is a fork.

Fields of Fork

prev: Tip

Previous block on this fork.

head: Tip

Current chain head.

fork_point: Tip

Fork point for rewind.

Reorg

Block updates the chain head via a (potentially disruptive) "reorg". Previous block was not our previous chain head.

Fields of Reorg

prev: Tip

Previous block on this fork.

prev_head: Tip

Previous chain head.

fork_point: Tip

Fork point for rewind.

Implementations

impl BlockStatus[src]

pub fn is_next(&self) -> bool[src]

Is this the "next" block?

pub fn is_reorg(&self) -> bool[src]

Is this block a "reorg"?

Trait Implementations

impl Clone for BlockStatus[src]

impl Copy for BlockStatus[src]

impl Debug for BlockStatus[src]

impl PartialEq<BlockStatus> for BlockStatus[src]

impl StructuralPartialEq for BlockStatus[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> CloneAny for T where
    T: Clone + Any

impl<T> DebugAny for T where
    T: Any + Debug

impl<'a, T> DefaultFeatures<'a> for T where
    T: 'a + Clone + Send + Sync

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

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

impl<'a, T> NonSyncFeatures<'a> for T where
    T: 'a + Clone

impl<T> SafeBorrow<T> for T where
    T: ?Sized

impl<T> Same<T> for T

type Output = T

Should always be Self

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<T> UnsafeAny for T where
    T: Any

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