[][src]Trait grin_pool::types::BlockChain

pub trait BlockChain: Sync + Send {
    fn verify_coinbase_maturity(
        &self,
        tx: &Transaction
    ) -> Result<(), PoolError>;
fn verify_tx_lock_height(&self, tx: &Transaction) -> Result<(), PoolError>;
fn validate_tx(&self, tx: &Transaction) -> Result<(), PoolError>;
fn chain_head(&self) -> Result<BlockHeader, PoolError>;
fn get_block_header(&self, hash: &Hash) -> Result<BlockHeader, PoolError>;
fn get_block_sums(&self, hash: &Hash) -> Result<BlockSums, PoolError>; }

Interface that the pool requires from a blockchain implementation.

Required methods

fn verify_coinbase_maturity(&self, tx: &Transaction) -> Result<(), PoolError>

Verify any coinbase outputs being spent have matured sufficiently.

fn verify_tx_lock_height(&self, tx: &Transaction) -> Result<(), PoolError>

Verify any coinbase outputs being spent have matured sufficiently.

fn validate_tx(&self, tx: &Transaction) -> Result<(), PoolError>

fn chain_head(&self) -> Result<BlockHeader, PoolError>

fn get_block_header(&self, hash: &Hash) -> Result<BlockHeader, PoolError>

fn get_block_sums(&self, hash: &Hash) -> Result<BlockSums, PoolError>

Loading content...

Implementors

Loading content...