pub trait Block: Decidable + Initializer + StatusWriter + Sync + Send {
    fn bytes<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = &'_ [u8]> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn to_bytes<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn height<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn timestamp<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = u64> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn parent<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Id> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn verify<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

ref.https://pkg.go.dev/github.com/ava-labs/avalanchego/snow/consensus/snowman#Block

Required Methods

Returns the bytes of this block.

Returns bytes from serde.

Returns the height of the block in the chain.

Returns the creation timestamp of the block in the chain.

Returns the ID of this block’s parent.

Returns error if the block can not be verified.

Implementors