ABCI message updates (code/log/info)

* Add info to Response[CheckTx/DeliverTx/Query]
* Remove code and log from Response[SetOption/Commit]
This commit is contained in:
Jae Kwon
2017-12-26 15:46:06 -08:00
parent 66580408f8
commit 8f87efd7f8
14 changed files with 229 additions and 311 deletions

View File

@ -29,12 +29,10 @@ func InitChain(client abcicli.Client) error {
}
func SetOption(client abcicli.Client, key, value string) error {
res, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value})
log := res.GetLog()
_, err := client.SetOptionSync(types.RequestSetOption{Key: key, Value: value})
if err != nil {
fmt.Println("Failed test: SetOption")
fmt.Printf("setting %v=%v: \nlog: %v\n", key, value, log)
fmt.Println("Failed test: SetOption")
fmt.Printf("error while setting %v=%v: \nerror: %v\n", key, value)
return err
}
fmt.Println("Passed test: SetOption")
@ -43,10 +41,10 @@ func SetOption(client abcicli.Client, key, value string) error {
func Commit(client abcicli.Client, hashExp []byte) error {
res, err := client.CommitSync()
_, data := res.Code, res.Data
data := res.Data
if err != nil {
fmt.Println("Failed test: Commit")
fmt.Printf("committing %v\nlog: %v\n", res.GetLog(), err)
fmt.Printf("error while committing: %v\n", err)
return err
}
if !bytes.Equal(data, hashExp) {