Documentation ¶
Index ¶
- Constants
- func InitDummy(app *PersistentDummyApplication)
- func MakeValSetChangeTx(pubkey []byte, power int64) []byte
- func RandVal(i int) types.Validator
- func RandVals(cnt int) []types.Validator
- type DummyApplication
- func (app *DummyApplication) CheckTx(tx []byte) types.ResponseCheckTx
- func (app *DummyApplication) Commit() types.ResponseCommit
- func (app *DummyApplication) DeliverTx(tx []byte) types.ResponseDeliverTx
- func (app *DummyApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
- func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
- type PersistentDummyApplication
- func (app *PersistentDummyApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
- func (app *PersistentDummyApplication) CheckTx(tx []byte) types.ResponseCheckTx
- func (app *PersistentDummyApplication) Commit() types.ResponseCommit
- func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.ResponseDeliverTx
- func (app *PersistentDummyApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
- func (app *PersistentDummyApplication) Info(req types.RequestInfo) types.ResponseInfo
- func (app *PersistentDummyApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain
- func (app *PersistentDummyApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
- func (app *PersistentDummyApplication) SetLogger(l log.Logger)
- func (app *PersistentDummyApplication) SetOption(req types.RequestSetOption) types.ResponseSetOption
- func (app *PersistentDummyApplication) Validators() (validators []types.Validator)
- type State
Constants ¶
View Source
const (
ValidatorSetChangePrefix string = "val:"
)
Variables ¶
This section is empty.
Functions ¶
func InitDummy ¶ added in v0.7.0
func InitDummy(app *PersistentDummyApplication)
InitDummy initializes the dummy 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
func MakeValSetChangeTx ¶
Types ¶
type DummyApplication ¶
type DummyApplication struct { types.BaseApplication // contains filtered or unexported fields }
func NewDummyApplication ¶
func NewDummyApplication() *DummyApplication
func (*DummyApplication) CheckTx ¶
func (app *DummyApplication) CheckTx(tx []byte) types.ResponseCheckTx
func (*DummyApplication) Commit ¶
func (app *DummyApplication) Commit() types.ResponseCommit
func (*DummyApplication) DeliverTx ¶
func (app *DummyApplication) DeliverTx(tx []byte) types.ResponseDeliverTx
tx is either "key=value" or just arbitrary bytes
func (*DummyApplication) Info ¶
func (app *DummyApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
func (*DummyApplication) Query ¶
func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery)
type PersistentDummyApplication ¶
type PersistentDummyApplication struct { // validator set ValUpdates []types.Validator // contains filtered or unexported fields }
func NewPersistentDummyApplication ¶
func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication
func (*PersistentDummyApplication) BeginBlock ¶
func (app *PersistentDummyApplication) BeginBlock(req types.RequestBeginBlock) types.ResponseBeginBlock
Track the block hash and header information
func (*PersistentDummyApplication) CheckTx ¶
func (app *PersistentDummyApplication) CheckTx(tx []byte) types.ResponseCheckTx
func (*PersistentDummyApplication) Commit ¶
func (app *PersistentDummyApplication) Commit() types.ResponseCommit
Commit will panic if InitChain was not called
func (*PersistentDummyApplication) DeliverTx ¶
func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.ResponseDeliverTx
tx is either "val:pubkey/power" or "key=value" or just arbitrary bytes
func (*PersistentDummyApplication) EndBlock ¶
func (app *PersistentDummyApplication) EndBlock(req types.RequestEndBlock) types.ResponseEndBlock
Update the validator set
func (*PersistentDummyApplication) Info ¶
func (app *PersistentDummyApplication) Info(req types.RequestInfo) types.ResponseInfo
func (*PersistentDummyApplication) InitChain ¶
func (app *PersistentDummyApplication) InitChain(req types.RequestInitChain) types.ResponseInitChain
Save the validators in the merkle tree
func (*PersistentDummyApplication) Query ¶
func (app *PersistentDummyApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
func (*PersistentDummyApplication) SetLogger ¶ added in v0.5.0
func (app *PersistentDummyApplication) SetLogger(l log.Logger)
func (*PersistentDummyApplication) SetOption ¶
func (app *PersistentDummyApplication) SetOption(req types.RequestSetOption) types.ResponseSetOption
func (*PersistentDummyApplication) Validators ¶
func (app *PersistentDummyApplication) Validators() (validators []types.Validator)
Click to show internal directories.
Click to hide internal directories.