Documentation
¶
Index ¶
- Constants
- func InitDummy(app *PersistentDummyApplication)
- func MakeValSetChangeTx(pubkey []byte, power uint64) []byte
- func RandVal(i int) *types.Validator
- func RandVals(cnt int) []*types.Validator
- type DummyApplication
- func (app *DummyApplication) CheckTx(tx []byte) types.Result
- func (app *DummyApplication) Commit() types.Result
- func (app *DummyApplication) DeliverTx(tx []byte) types.Result
- 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(params types.RequestBeginBlock)
- func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result
- func (app *PersistentDummyApplication) Commit() types.Result
- func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.Result
- func (app *PersistentDummyApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
- func (app *PersistentDummyApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
- func (app *PersistentDummyApplication) InitChain(params types.RequestInitChain)
- func (app *PersistentDummyApplication) Query(reqQuery types.RequestQuery) types.ResponseQuery
- func (app *PersistentDummyApplication) SetLogger(l log.Logger)
- func (app *PersistentDummyApplication) SetOption(key string, value string) (log string)
- func (app *PersistentDummyApplication) Validators() (validators []*types.Validator)
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) Commit ¶
func (app *DummyApplication) Commit() types.Result
func (*DummyApplication) DeliverTx ¶
func (app *DummyApplication) DeliverTx(tx []byte) types.Result
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 {
// contains filtered or unexported fields
}
func NewPersistentDummyApplication ¶
func NewPersistentDummyApplication(dbDir string) *PersistentDummyApplication
func (*PersistentDummyApplication) BeginBlock ¶
func (app *PersistentDummyApplication) BeginBlock(params types.RequestBeginBlock)
Track the block hash and header information
func (*PersistentDummyApplication) CheckTx ¶
func (app *PersistentDummyApplication) CheckTx(tx []byte) types.Result
func (*PersistentDummyApplication) Commit ¶
func (app *PersistentDummyApplication) Commit() types.Result
Commit will panic if InitChain was not called
func (*PersistentDummyApplication) DeliverTx ¶
func (app *PersistentDummyApplication) DeliverTx(tx []byte) types.Result
tx is either "val:pubkey/power" or "key=value" or just arbitrary bytes
func (*PersistentDummyApplication) EndBlock ¶
func (app *PersistentDummyApplication) EndBlock(height uint64) (resEndBlock types.ResponseEndBlock)
Update the validator set
func (*PersistentDummyApplication) Info ¶
func (app *PersistentDummyApplication) Info(req types.RequestInfo) (resInfo types.ResponseInfo)
func (*PersistentDummyApplication) InitChain ¶
func (app *PersistentDummyApplication) InitChain(params types.RequestInitChain)
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(key string, value string) (log string)
func (*PersistentDummyApplication) Validators ¶
func (app *PersistentDummyApplication) Validators() (validators []*types.Validator)
Click to show internal directories.
Click to hide internal directories.