Fixed linter

This commit is contained in:
Jasmina Malicevic
2022-12-21 21:37:59 +01:00
parent df9590b71e
commit a8a2dec170
4 changed files with 4 additions and 11 deletions

View File

@@ -113,11 +113,6 @@ func (idx *BlockerIndexer) Search(ctx context.Context, q *query.Query) ([]int64,
if matchEvents {
matchEventIdx = 0
} else {
matchEventIdx = -1
}
if matchEventIdx != -1 {
skipIndexes = append(skipIndexes, matchEventIdx)
}

View File

@@ -142,7 +142,7 @@ func lookForHeight(conditions []query.Condition) (int64, bool, int) {
return 0, false, -1
}
func dedupHeight(conditions []query.Condition) (dedupConditions []query.Condition, heightInfo HeightInfo, found bool) { //} height int64, found bool, idx int) {
func dedupHeight(conditions []query.Condition) (dedupConditions []query.Condition, heightInfo HeightInfo, found bool) {
heightInfo.heightEqIdx = -1
heightRangeExists := false
var heightCondition []query.Condition
@@ -183,7 +183,7 @@ func dedupHeight(conditions []query.Condition) (dedupConditions []query.Conditio
heightInfo.heightEqIdx = 0
heightInfo.onlyHeightEq = false
}
return
return dedupConditions, heightInfo, found
}
func dedupMatchEvents(conditions []query.Condition) ([]query.Condition, bool) {

View File

@@ -236,8 +236,6 @@ func (txi *TxIndex) Search(ctx context.Context, q *query.Query) ([]*abci.TxResul
if matchEvents {
matchEventIdx = 0
skipIndexes = append(skipIndexes, matchEventIdx)
} else {
matchEventIdx = -1
}
// if there is a height condition ("tx.height=3"), extract it

View File

@@ -64,7 +64,7 @@ func ParseEventSeqFromEventKey(key []byte) (int64, error) {
return eventSeq, nil
}
func dedupHeight(conditions []query.Condition) (dedupConditions []query.Condition, heightInfo HeightInfo) { //} height int64, found bool, idx int) {
func dedupHeight(conditions []query.Condition) (dedupConditions []query.Condition, heightInfo HeightInfo) {
heightInfo.heightEqIdx = -1
heightRangeExists := false
var heightCondition []query.Condition
@@ -103,7 +103,7 @@ func dedupHeight(conditions []query.Condition) (dedupConditions []query.Conditio
heightInfo.heightEqIdx = 0
heightInfo.onlyHeightEq = false
}
return
return dedupConditions, heightInfo
}
func checkHeightConditions(heightInfo HeightInfo, keyHeight int64) bool {