everything takes Request, returns Response; expect DeliverTx/CheckTx/Commit

This commit is contained in:
Ethan Buchman
2017-11-27 19:04:21 +00:00
parent 67d2a5f66d
commit c7f54fb56c
15 changed files with 174 additions and 291 deletions

View File

@ -24,11 +24,12 @@ func (app *CounterApplication) Info(req types.RequestInfo) types.ResponseInfo {
return types.ResponseInfo{Data: cmn.Fmt("{\"hashes\":%v,\"txs\":%v}", app.hashCount, app.txCount)}
}
func (app *CounterApplication) SetOption(key string, value string) (log string) {
func (app *CounterApplication) SetOption(req types.RequestSetOption) types.ResponseSetOption {
key, value := req.Key, req.Value
if key == "serial" && value == "on" {
app.serial = true
}
return ""
return types.ResponseSetOption{}
}
func (app *CounterApplication) DeliverTx(tx []byte) types.ResponseDeliverTx {