mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-08 06:15:33 +00:00
Added clarification comments
This commit is contained in:
@@ -142,6 +142,10 @@ func lookForHeight(conditions []query.Condition) (int64, bool, int) {
|
||||
return 0, false, -1
|
||||
}
|
||||
|
||||
// Remove all occurrences of height equality queries except one. While we are traversing the conditions, check whether the only condition in
|
||||
// addition to match events is the height equality or height range query. At the same time, if we do have a height range condition
|
||||
// ignore the height equality condition. If a height equality exists, place the condition index in the query and the desired height
|
||||
// into the heightInfo struct
|
||||
func dedupHeight(conditions []query.Condition) (dedupConditions []query.Condition, heightInfo HeightInfo, found bool) {
|
||||
heightInfo.heightEqIdx = -1
|
||||
heightRangeExists := false
|
||||
|
||||
@@ -77,7 +77,8 @@ func (qr QueryRange) UpperBoundValue() interface{} {
|
||||
}
|
||||
|
||||
// LookForRanges returns a mapping of QueryRanges and the matching indexes in
|
||||
// the provided query conditions.
|
||||
// the provided query conditions. If we are matching attributes within events
|
||||
// we need to remember the height range from the condition
|
||||
func LookForRanges(conditions []query.Condition) (ranges QueryRanges, indexes []int, heightRange QueryRange) {
|
||||
ranges = make(QueryRanges)
|
||||
for i, c := range conditions {
|
||||
|
||||
Reference in New Issue
Block a user