CommitSync() returns tmsp.Result

This commit is contained in:
Jae Kwon
2016-03-23 02:49:30 -07:00
parent de6f76758d
commit 8183e3201b
5 changed files with 21 additions and 21 deletions

View File

@ -258,12 +258,12 @@ func getProxyApp(addr string, hash []byte) (proxyAppConn proxy.AppConn) {
}
// Check the hash
currentHash, _, err := proxyAppConn.CommitSync()
if err != nil {
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", err))
res := proxyAppConn.CommitSync()
if res.IsErr() {
PanicCrisis(Fmt("Error in getting proxyAppConn hash: %v", res))
}
if !bytes.Equal(hash, currentHash) {
PanicCrisis(Fmt("ProxyApp hash does not match. Expected %X, got %X", hash, currentHash))
if !bytes.Equal(hash, res.Data) {
PanicCrisis(Fmt("ProxyApp hash does not match. Expected %X, got %X", hash, res.Data))
}
return proxyAppConn