Fixed linter error

This commit is contained in:
Jasmina Malicevic
2022-12-22 16:29:50 +01:00
parent d355a93572
commit 1e27e76664
2 changed files with 8 additions and 4 deletions

View File

@@ -209,8 +209,10 @@ func dedupMatchEvents(conditions []query.Condition) ([]query.Condition, bool) {
}
func checkHeightConditions(heightInfo HeightInfo, keyHeight int64) bool {
if heightInfo.heightRange.Key != "" && !checkBounds(heightInfo.heightRange, keyHeight) {
if heightInfo.heightRange.Key != "" {
if !checkBounds(heightInfo.heightRange, keyHeight) {
return false
}
} else {
if heightInfo.height != 0 && keyHeight != heightInfo.height {
return false

View File

@@ -107,8 +107,10 @@ func dedupHeight(conditions []query.Condition) (dedupConditions []query.Conditio
}
func checkHeightConditions(heightInfo HeightInfo, keyHeight int64) bool {
if heightInfo.heightRange.Key != "" && !checkBounds(heightInfo.heightRange, keyHeight) {
if heightInfo.heightRange.Key != "" {
if !checkBounds(heightInfo.heightRange, keyHeight) {
return false
}
} else {
if heightInfo.height != 0 && keyHeight != heightInfo.height {
return false