mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-07 00:26:58 +00:00
Query returns Code
This commit is contained in:
@@ -18,5 +18,5 @@ type Application interface {
|
||||
GetHash() (hash []byte, log string)
|
||||
|
||||
// Query for state
|
||||
Query(query []byte) (result []byte, log string)
|
||||
Query(query []byte) (code RetCode, result []byte, log string)
|
||||
}
|
||||
|
||||
+4
-1
@@ -125,6 +125,7 @@ func ResponseSetOption(log string) *Response {
|
||||
func ResponseAppendTx(code RetCode, result []byte, log string) *Response {
|
||||
return &Response{
|
||||
Type: ResponseTypeAppendTx,
|
||||
Code: uint32(code),
|
||||
Data: result,
|
||||
Log: log,
|
||||
}
|
||||
@@ -133,6 +134,7 @@ func ResponseAppendTx(code RetCode, result []byte, log string) *Response {
|
||||
func ResponseCheckTx(code RetCode, result []byte, log string) *Response {
|
||||
return &Response{
|
||||
Type: ResponseTypeCheckTx,
|
||||
Code: uint32(code),
|
||||
Data: result,
|
||||
Log: log,
|
||||
}
|
||||
@@ -146,9 +148,10 @@ func ResponseGetHash(hash []byte, log string) *Response {
|
||||
}
|
||||
}
|
||||
|
||||
func ResponseQuery(result []byte, log string) *Response {
|
||||
func ResponseQuery(code RetCode, result []byte, log string) *Response {
|
||||
return &Response{
|
||||
Type: ResponseTypeQuery,
|
||||
Code: uint32(code),
|
||||
Data: result,
|
||||
Log: log,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user