state

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidTxError added in v0.7.0

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

func (InvalidTxError) Error added in v0.7.0

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 added in v0.7.0

func (s *State) ExecBlock(eventCache types.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 added in v0.7.0

func (s *State) Save()

func (*State) ValidateBlock added in v0.7.0

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