mock

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2020 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chain

type Chain struct {
	// contains filtered or unexported fields
}

func NewChain

func NewChain() *Chain

func (*Chain) BestBlockHeader

func (c *Chain) BestBlockHeader() *types.BlockHeader

func (*Chain) BestBlockHeight

func (c *Chain) BestBlockHeight() uint64

func (*Chain) CalcNextSeed

func (c *Chain) CalcNextSeed(hash *bc.Hash) (*bc.Hash, error)

func (*Chain) GetBlockByHash

func (c *Chain) GetBlockByHash(hash *bc.Hash) (*types.Block, error)

func (*Chain) GetBlockByHeight

func (c *Chain) GetBlockByHeight(height uint64) (*types.Block, error)

func (*Chain) GetHeaderByHash

func (c *Chain) GetHeaderByHash(hash *bc.Hash) (*types.BlockHeader, error)

func (*Chain) GetHeaderByHeight

func (c *Chain) GetHeaderByHeight(height uint64) (*types.BlockHeader, error)

func (*Chain) GetTransactionStatus added in v1.0.5

func (c *Chain) GetTransactionStatus(hash *bc.Hash) (*bc.TransactionStatus, error)

func (*Chain) InMainChain

func (c *Chain) InMainChain(hash bc.Hash) bool

func (*Chain) ProcessBlock

func (c *Chain) ProcessBlock(block *types.Block) (bool, error)

func (*Chain) SetBestBlockHeader

func (c *Chain) SetBestBlockHeader(header *types.BlockHeader)

func (*Chain) SetBlockByHeight

func (c *Chain) SetBlockByHeight(height uint64, block *types.Block)

func (*Chain) ValidateTx

func (c *Chain) ValidateTx(*types.Tx) (bool, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL