clientchain

package
v0.0.0-...-f5f0bdb Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2019 License: GPL-3.0 Imports: 14 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 {
	Blocks *clientdb.BlockDB
	Chain  *clientchaintypes.ChainJSON
	//Executor *clientwasm.Executer
	Genesis *clientchaintypes.ChainGenesis
	State   *clientdb.StateDB
}

Chain ...

func NewChain

func NewChain(config *clienttypes.ConfigClient) (*Chain, error)

NewChain ...

func (*Chain) CreateGenesis

func (c *Chain) CreateGenesis() (*clientchaintypes.ChainGenesis, error)

CreateGenesis ...

func (*Chain) CreateGenesisBlock

func (c *Chain) CreateGenesisBlock() (*clientchaintypes.ChainGenesis, error)

CreateGenesisBlock ...

func (*Chain) CreateGenesisState

func (c *Chain) CreateGenesisState()

CreateGenesisState ...

func (*Chain) GetBestBlocksHash

func (c *Chain) GetBestBlocksHash() ([]byte, error)

GetBestBlocksHash ...

func (*Chain) GetBestBlocksNumber

func (c *Chain) GetBestBlocksNumber() (*big.Int, error)

GetBestBlocksNumber ...

func (*Chain) GetBlock

func (c *Chain) GetBlock(headerHash []uint8) *clienttypes.BlockData

GetBlock ...

func (*Chain) GetBlockDataByHash

func (c *Chain) GetBlockDataByHash(hash []byte) (*clienttypes.StateBlock, error)

GetBlockDataByHash ...

func (*Chain) GetCode

func (c *Chain) GetCode() []uint8

GetCode ...

func (*Chain) GetGenesisHash

func (c *Chain) GetGenesisHash() ([]byte, error)

GetGenesisHash ...

func (*Chain) ImportBlock

func (c *Chain) ImportBlock(block *clienttypes.StateBlock) (bool, error)

ImportBlock ...

func (*Chain) InitGenesis

func (c *Chain) InitGenesis() (*clientchaintypes.ChainGenesis, error)

InitGenesis ...

func (*Chain) InitGenesisFromBest

func (c *Chain) InitGenesisFromBest(bestHeader *clienttypes.Header, rollback bool) *clientchaintypes.ChainGenesis

InitGenesisFromBest ... NOTE: the default for rollback bool should be true

func (*Chain) RollbackBlock

func (c *Chain) RollbackBlock(bestHeader *clienttypes.Header, rollback bool) *clientchaintypes.ChainGenesis

RollbackBlock ... NOTE: the default for rollback bool should be true

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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