From 1e27e76664b2af80e9de8f92a9c649f626aee1c1 Mon Sep 17 00:00:00 2001 From: Jasmina Malicevic Date: Thu, 22 Dec 2022 16:29:50 +0100 Subject: [PATCH] Fixed linter error --- state/indexer/block/kv/util.go | 6 ++++-- state/txindex/kv/utils.go | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/state/indexer/block/kv/util.go b/state/indexer/block/kv/util.go index b146723ba..6c56fe0a2 100644 --- a/state/indexer/block/kv/util.go +++ b/state/indexer/block/kv/util.go @@ -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) { - return false + if heightInfo.heightRange.Key != "" { + if !checkBounds(heightInfo.heightRange, keyHeight) { + return false + } } else { if heightInfo.height != 0 && keyHeight != heightInfo.height { return false diff --git a/state/txindex/kv/utils.go b/state/txindex/kv/utils.go index 046635344..5b2fc93ba 100644 --- a/state/txindex/kv/utils.go +++ b/state/txindex/kv/utils.go @@ -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) { - return false + if heightInfo.heightRange.Key != "" { + if !checkBounds(heightInfo.heightRange, keyHeight) { + return false + } } else { if heightInfo.height != 0 && keyHeight != heightInfo.height { return false