mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-13 05:11:21 +00:00
BaseApplication
This commit is contained in:
@ -30,6 +30,8 @@ func main() {
|
||||
}
|
||||
|
||||
type ChainAwareApplication struct {
|
||||
types.BaseApplication
|
||||
|
||||
beginCount int
|
||||
endCount int
|
||||
}
|
||||
@ -38,26 +40,6 @@ func NewChainAwareApplication() *ChainAwareApplication {
|
||||
return &ChainAwareApplication{}
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) Info() types.ResponseInfo {
|
||||
return types.ResponseInfo{}
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) SetOption(key string, value string) (log string) {
|
||||
return ""
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) DeliverTx(tx []byte) types.Result {
|
||||
return types.NewResultOK(nil, "")
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) CheckTx(tx []byte) types.Result {
|
||||
return types.NewResultOK(nil, "")
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) Commit() types.Result {
|
||||
return types.NewResultOK([]byte("nil"), "")
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) Query(reqQuery types.RequestQuery) (resQuery types.ResponseQuery) {
|
||||
return types.ResponseQuery{
|
||||
Value: []byte(cmn.Fmt("%d,%d", app.beginCount, app.endCount)),
|
||||
@ -73,7 +55,3 @@ func (app *ChainAwareApplication) EndBlock(height uint64) (resEndBlock types.Res
|
||||
app.endCount++
|
||||
return
|
||||
}
|
||||
|
||||
func (app *ChainAwareApplication) InitChain(vals []*types.Validator) {
|
||||
return
|
||||
}
|
||||
|
Reference in New Issue
Block a user