Documentation
¶
Index ¶
- Constants
- func InitKVStore(app *PersistentKVStoreApplication)
- func MakeValSetChangeTx(pubkey *types.PubKey, power int64) []byte
- func RandVal(i int) types.Validator
- func RandVals(cnt int) []types.Validator
- type KVStoreApplication
- func (app *KVStoreApplication) CheckTx(tx []byte) types.ResultCheckTx
- func (app *KVStoreApplication) Commit() types.ResultCommit
- func (app *KVStoreApplication) DeliverTx(tx []byte) types.ResultDeliverTx
- func (app *KVStoreApplication) Info(req types.ParamsInfo) (resInfo types.ResultInfo)
- func (app *KVStoreApplication) Query(reqQuery types.ParamsQuery) (resQuery types.ResultQuery)
- type PersistentKVStoreApplication
- func (app *PersistentKVStoreApplication) BeginBlock(req types.ParamsBeginBlock) types.ResultBeginBlock
- func (app *PersistentKVStoreApplication) CheckTx(tx []byte) types.ResultCheckTx
- func (app *PersistentKVStoreApplication) Commit() types.ResultCommit
- func (app *PersistentKVStoreApplication) DeliverTx(tx []byte) types.ResultDeliverTx
- func (app *PersistentKVStoreApplication) EndBlock(req types.ParamsEndBlock) types.ResultEndBlock
- func (app *PersistentKVStoreApplication) Info(req types.ParamsInfo) types.ResultInfo
- func (app *PersistentKVStoreApplication) InitChain(req types.ParamsInitChain) types.ResultInitChain
- func (app *PersistentKVStoreApplication) Query(reqQuery types.ParamsQuery) types.ResultQuery
- func (app *PersistentKVStoreApplication) SetLogger(l log.Logger)
- func (app *PersistentKVStoreApplication) SetOption(req types.ParamsSetOption) types.ResultSetOption
- func (app *PersistentKVStoreApplication) Validators() (validators []types.Validator)
- type State
Constants ¶
View Source
const (
ValidatorSetChangePrefix string = "val:"
)
Variables ¶
This section is empty.
Functions ¶
func InitKVStore ¶
func InitKVStore(app *PersistentKVStoreApplication)
InitKVStore initializes the kvstore app with some data, which allows tests to pass and is fine as long as you don't make any tx that modify the validator state
Types ¶
type KVStoreApplication ¶
type KVStoreApplication struct { types.BaseApplication // contains filtered or unexported fields }
func NewKVStoreApplication ¶
func NewKVStoreApplication() *KVStoreApplication
func (*KVStoreApplication) CheckTx ¶
func (app *KVStoreApplication) CheckTx(tx []byte) types.ResultCheckTx
func (*KVStoreApplication) Commit ¶
func (app *KVStoreApplication) Commit() types.ResultCommit
func (*KVStoreApplication) DeliverTx ¶
func (app *KVStoreApplication) DeliverTx(tx []byte) types.ResultDeliverTx
tx is either "key=value" or just arbitrary bytes
func (*KVStoreApplication) Info ¶
func (app *KVStoreApplication) Info(req types.ParamsInfo) (resInfo types.ResultInfo)
func (*KVStoreApplication) Query ¶
func (app *KVStoreApplication) Query(reqQuery types.ParamsQuery) (resQuery types.ResultQuery)
type PersistentKVStoreApplication ¶
type PersistentKVStoreApplication struct { // validator set ValUpdates []types.Validator // contains filtered or unexported fields }
func NewPersistentKVStoreApplication ¶
func NewPersistentKVStoreApplication(dbDir string) *PersistentKVStoreApplication
func (*PersistentKVStoreApplication) BeginBlock ¶
func (app *PersistentKVStoreApplication) BeginBlock(req types.ParamsBeginBlock) types.ResultBeginBlock
Track the block hash and header information
func (*PersistentKVStoreApplication) CheckTx ¶
func (app *PersistentKVStoreApplication) CheckTx(tx []byte) types.ResultCheckTx
func (*PersistentKVStoreApplication) Commit ¶
func (app *PersistentKVStoreApplication) Commit() types.ResultCommit
Commit will panic if InitChain was not called
func (*PersistentKVStoreApplication) DeliverTx ¶
func (app *PersistentKVStoreApplication) DeliverTx(tx []byte) types.ResultDeliverTx
tx is either "val:pubkey/power" or "key=value" or just arbitrary bytes
func (*PersistentKVStoreApplication) EndBlock ¶
func (app *PersistentKVStoreApplication) EndBlock(req types.ParamsEndBlock) types.ResultEndBlock
Update the validator set
func (*PersistentKVStoreApplication) Info ¶
func (app *PersistentKVStoreApplication) Info(req types.ParamsInfo) types.ResultInfo
func (*PersistentKVStoreApplication) InitChain ¶
func (app *PersistentKVStoreApplication) InitChain(req types.ParamsInitChain) types.ResultInitChain
Save the validators in the merkle tree
func (*PersistentKVStoreApplication) Query ¶
func (app *PersistentKVStoreApplication) Query(reqQuery types.ParamsQuery) types.ResultQuery
func (*PersistentKVStoreApplication) SetLogger ¶
func (app *PersistentKVStoreApplication) SetLogger(l log.Logger)
func (*PersistentKVStoreApplication) SetOption ¶
func (app *PersistentKVStoreApplication) SetOption(req types.ParamsSetOption) types.ResultSetOption
func (*PersistentKVStoreApplication) Validators ¶
func (app *PersistentKVStoreApplication) Validators() (validators []types.Validator)
Click to show internal directories.
Click to hide internal directories.