tendermint/example/nil/nil_app.go

37 lines
734 B
Go
Raw Normal View History

2016-02-26 17:04:28 -08:00
package nilapp
import (
2017-01-12 12:47:55 -08:00
"github.com/tendermint/abci/types"
2016-02-26 17:04:28 -08:00
)
type NilApplication struct {
}
func NewNilApplication() *NilApplication {
return &NilApplication{}
}
2016-12-26 17:44:36 -08:00
func (app *NilApplication) Info() (resInfo types.ResponseInfo) {
return
2016-02-26 17:04:28 -08:00
}
func (app *NilApplication) SetOption(key string, value string) (log string) {
return ""
}
2017-01-12 12:27:08 -08:00
func (app *NilApplication) DeliverTx(tx []byte) types.Result {
return types.NewResultOK(nil, "")
2016-02-26 17:04:28 -08:00
}
func (app *NilApplication) CheckTx(tx []byte) types.Result {
return types.NewResultOK(nil, "")
2016-02-26 17:04:28 -08:00
}
2016-03-23 02:50:29 -07:00
func (app *NilApplication) Commit() types.Result {
return types.NewResultOK([]byte("nil"), "")
2016-02-26 17:04:28 -08:00
}
func (app *NilApplication) Query(query []byte) types.Result {
return types.NewResultOK(nil, "")
2016-02-26 17:04:28 -08:00
}