mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-31 20:21:56 +00:00
nil app
This commit is contained in:
36
example/nil/nil_app.go
Normal file
36
example/nil/nil_app.go
Normal 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, ""
|
||||
}
|
Reference in New Issue
Block a user