mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-29 11:15:50 +00:00
nil app
This commit is contained in:
@@ -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