Versions in this module Expand all Collapse all v1 v1.0.0 May 26, 2022 Changes in this version + var ErrFoundHeaderByHash = errors.New("can't find header by hash") + var ErrFoundHeaderByHeight = errors.New("can't find header by height") + type Chain struct + func NewChain() *Chain + func (c *Chain) BestBlockHeader() *types.BlockHeader + func (c *Chain) BestBlockHeight() uint64 + func (c *Chain) CalcNextSeed(hash *bc.Hash) (*bc.Hash, error) + func (c *Chain) GetBlockByHash(hash *bc.Hash) (*types.Block, error) + func (c *Chain) GetBlockByHeight(height uint64) (*types.Block, error) + func (c *Chain) GetHeaderByHash(hash *bc.Hash) (*types.BlockHeader, error) + func (c *Chain) GetHeaderByHeight(height uint64) (*types.BlockHeader, error) + func (c *Chain) InMainChain(hash bc.Hash) bool + func (c *Chain) LastJustifiedHeader() (*types.BlockHeader, error) + func (c *Chain) ProcessBlock(block *types.Block) (bool, error) + func (c *Chain) SetBestBlockHeader(header *types.BlockHeader) + func (c *Chain) SetBlockByHeight(height uint64, block *types.Block) + func (c *Chain) ValidateTx(*types.Tx) (bool, error) + type Mempool struct + func (m *Mempool) AddTx(tx *types.Tx) + func (m *Mempool) GetTransactions() []*protocol.TxDesc + func (m *Mempool) IsDust(tx *types.Tx) bool