app

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2017 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ModuleNameBase = "base"
	ChainKey       = "chain_id"
)

nolint

Variables

This section is empty.

Functions

This section is empty.

Types

type Basecoin

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

Basecoin - The ABCI application

func NewBasecoin

func NewBasecoin(handler sdk.Handler, store *Store, logger log.Logger) *Basecoin

NewBasecoin - create a new instance of the basecoin application

func NewBasecoinTick added in v0.7.0

func NewBasecoinTick(handler sdk.Handler, store *Store, logger log.Logger, tick Ticker) *Basecoin

NewBasecoinTick - create a new instance of the basecoin application with tick functionality

func (*Basecoin) BeginBlock

func (app *Basecoin) BeginBlock(req abci.RequestBeginBlock)

BeginBlock - ABCI

func (*Basecoin) CheckTx

func (app *Basecoin) CheckTx(txBytes []byte) abci.Result

CheckTx - ABCI

func (*Basecoin) Commit

func (app *Basecoin) Commit() (res abci.Result)

Commit - ABCI

func (*Basecoin) DeliverTx

func (app *Basecoin) DeliverTx(txBytes []byte) abci.Result

DeliverTx - ABCI

func (*Basecoin) EndBlock

func (app *Basecoin) EndBlock(height uint64) (res abci.ResponseEndBlock)

EndBlock - ABCI Returns a list of all validator changes made in this block

func (*Basecoin) GetChainID added in v0.7.0

func (app *Basecoin) GetChainID() string

GetChainID returns the currently stored chain

func (*Basecoin) GetState

func (app *Basecoin) GetState() sm.SimpleDB

GetState is back... please kill me

func (*Basecoin) Info

func (app *Basecoin) Info(req abci.RequestInfo) abci.ResponseInfo

Info - ABCI

func (*Basecoin) InitChain

func (app *Basecoin) InitChain(req abci.RequestInitChain)

InitChain - ABCI

func (*Basecoin) InitState added in v0.7.0

func (app *Basecoin) InitState(key string, value string) string

InitState - used to setup state (was SetOption) to be used by InitChain later

func (*Basecoin) LoadGenesis

func (app *Basecoin) LoadGenesis(path string) error

LoadGenesis - Load the genesis file into memory

func (*Basecoin) Query

func (app *Basecoin) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)

Query - ABCI

func (*Basecoin) SetOption

func (app *Basecoin) SetOption(key string, value string) string

SetOption - ABCI

type FullGenesisDoc

type FullGenesisDoc struct {
	ChainID    string      `json:"chain_id"`
	AppOptions *GenesisDoc `json:"app_options"`
}

FullGenesisDoc - includes tendermint (in the json, we ignore here)

type GenesisDoc

type GenesisDoc struct {
	Accounts      []json.RawMessage `json:"accounts"`
	PluginOptions []json.RawMessage `json:"plugin_options"`
	// contains filtered or unexported fields
}

GenesisDoc - All genesis values

type Store added in v0.7.0

type Store struct {
	state.State
	// contains filtered or unexported fields
}

Store contains the merkle tree, and all info to handle abci requests

func MockStore added in v0.7.0

func MockStore() *Store

MockStore returns an in-memory store only intended for testing

func NewStore added in v0.7.0

func NewStore(dbName string, cacheSize int, logger log.Logger) (*Store, error)

NewStore initializes an in-memory iavl.VersionedTree, or attempts to load a persistant tree from disk

func (*Store) Commit added in v0.7.0

func (s *Store) Commit() abci.Result

Commit implements abci.Application

func (*Store) Hash added in v0.7.0

func (s *Store) Hash() []byte

Hash gets the last hash stored in the database

func (*Store) Info added in v0.7.0

func (s *Store) Info() abci.ResponseInfo

Info implements abci.Application. It returns the height, hash and size (in the data). The height is the block that holds the transactions, not the apphash itself.

func (*Store) Query added in v0.7.0

func (s *Store) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQuery)

Query implements abci.Application

type Ticker added in v0.7.0

type Ticker func(sm.SimpleDB) ([]*abci.Validator, error)

Ticker - tick function

Jump to

Keyboard shortcuts

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