state

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2016 License: Apache-2.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 InvalidTxError

type InvalidTxError struct {
	Tx   types.Tx
	Code tmsp.CodeType
}

func (InvalidTxError) Error

func (txErr InvalidTxError) Error() string

type State

type State struct {
	GenesisDoc      *types.GenesisDoc
	ChainID         string
	LastBlockHeight int // Genesis state has this set to 0.  So, Block(H=0) does not exist.
	LastBlockHash   []byte
	LastBlockParts  types.PartSetHeader
	LastBlockTime   time.Time
	Validators      *types.ValidatorSet
	LastValidators  *types.ValidatorSet
	AppHash         []byte
	// contains filtered or unexported fields
}

NOTE: not goroutine-safe.

func LoadState

func LoadState(db dbm.DB) *State

func MakeGenesisState

func MakeGenesisState(db dbm.DB, genDoc *types.GenesisDoc) *State

func MakeGenesisStateFromFile

func MakeGenesisStateFromFile(db dbm.DB, genDocFile string) *State

func (*State) Copy

func (s *State) Copy() *State

func (*State) ExecBlock

func (s *State) ExecBlock(eventCache events.Fireable, proxyAppConn proxy.AppConnConsensus, block *types.Block, blockPartsHeader types.PartSetHeader) error

Execute the block to mutate State. Validates block and then executes Data.Txs in the block.

func (*State) Save

func (s *State) Save()

func (*State) ValidateBlock

func (s *State) ValidateBlock(block *types.Block) error

Validate block

Jump to

Keyboard shortcuts

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