BaseApplication

This commit is contained in:
Ethan Buchman
2017-02-13 20:16:21 -05:00
parent b6afa8d85b
commit e909cafa0b
6 changed files with 52 additions and 99 deletions
+2 -14
View File
@@ -9,6 +9,8 @@ import (
)
type DummyApplication struct {
types.BaseApplication
state merkle.Tree
}
@@ -21,10 +23,6 @@ func (app *DummyApplication) Info() (resInfo types.ResponseInfo) {
return types.ResponseInfo{Data: fmt.Sprintf("{\"size\":%v}", app.state.Size())}
}
func (app *DummyApplication) SetOption(key string, value string) (log string) {
return ""
}
// tx is either "key=value" or just arbitrary bytes
func (app *DummyApplication) DeliverTx(tx []byte) types.Result {
parts := strings.Split(string(tx), "=")
@@ -70,13 +68,3 @@ func (app *DummyApplication) Query(reqQuery types.RequestQuery) (resQuery types.
return
}
}
func (app *DummyApplication) InitChain(validators []*types.Validator) {
}
func (app *DummyApplication) BeginBlock(hash []byte, header *types.Header) {
}
func (app *DummyApplication) EndBlock(height uint64) types.ResponseEndBlock {
return types.ResponseEndBlock{}
}