Skip to content

Commit

Permalink
Store accessor upstream changes (#5119)
Browse files Browse the repository at this point in the history
* Store accessor upstream changes (#5119)
  • Loading branch information
fedekunze authored Oct 1, 2019
1 parent 828badd commit 21bd8d0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/state/enum.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,8 @@ func (v Enum) Transit(ctx Context, from, to byte) bool {
// Query() retrives state value and proof from a queryable reference
func (v Enum) Query(q ABCIQuerier) (res byte, proof *Proof, err error) {
value, proof, err := v.Value.QueryRaw(q)
if err != nil {
return
}
return value[0], proof, err
}
4 changes: 4 additions & 0 deletions store/state/integer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func (v Integer) Query(q ABCIQuerier) (res uint64, proof *Proof, err error) {
if err != nil {
return
}
if value == nil {
res = 0
return
}
res, err = DecodeInt(value, v.enc)
return
}

0 comments on commit 21bd8d0

Please sign in to comment.