pub trait ChainVm: Vm + Getter + Parser {
    fn build_block<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Block + Send + Sync>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn issue_tx<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Box<dyn Block + Send + Sync>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn set_preference<'life0, 'async_trait>(
        &'life0 self,
        id: Id
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn last_accepted<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<Id>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/snow/engine/snowman/block#ChainVm

Required Methods

Attempt to create a new block from ChainVm data Returns either a block or an error

Issues a transaction to the chain

Notify the Vm of the currently preferred block.

Returns the ID of the last accepted block. If no blocks have been accepted, this should return the genesis block

Implementors