This commit is contained in:
Ethan Buchman
2016-02-26 20:04:28 -05:00
parent 727fcd4ada
commit 500c173604
2 changed files with 127 additions and 0 deletions

36
example/nil/nil_app.go Normal file
View File

@@ -0,0 +1,36 @@
package nilapp
import (
"github.com/tendermint/tmsp/types"
)
type NilApplication struct {
}
func NewNilApplication() *NilApplication {
return &NilApplication{}
}
func (app *NilApplication) Info() string {
return "nil"
}
func (app *NilApplication) SetOption(key string, value string) (log string) {
return ""
}
func (app *NilApplication) AppendTx(tx []byte) (code types.CodeType, result []byte, log string) {
return types.CodeType_OK, nil, ""
}
func (app *NilApplication) CheckTx(tx []byte) (code types.CodeType, result []byte, log string) {
return types.CodeType_OK, nil, ""
}
func (app *NilApplication) Commit() (hash []byte, log string) {
return []byte("nil"), ""
}
func (app *NilApplication) Query(query []byte) (code types.CodeType, result []byte, log string) {
return types.CodeType_OK, nil, ""
}