Skip to content

Commit

Permalink
Merge pull request #113 from HaoyangLiu/irisnet/develop
Browse files Browse the repository at this point in the history
IRISHUB-524: Add check for iavl proof and value before building multistore proof
  • Loading branch information
wukongcheng authored Oct 11, 2018
2 parents c6189e6 + 36cb7e2 commit 6a35659
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions store/rootmultistore.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,14 @@ func (rs *rootMultiStore) Query(req abci.RequestQuery) abci.ResponseQuery {
return res
}

if len(res.Proof) == 0 {
if len(res.Value) == 0 {
return res
}
msg := fmt.Sprintf("proof from store %s is nil", storeName)
return sdk.ErrUnknownRequest(msg).QueryResult()
}

commitInfo, errMsg := getCommitInfo(rs.db, res.Height)
if errMsg != nil {
return sdk.ErrInternal(errMsg.Error()).QueryResult()
Expand Down

0 comments on commit 6a35659

Please sign in to comment.