state

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2016 License: Apache-2.0 Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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