From 9a8474c3c72e75f769da9d2bc8c8485ed1e123e8 Mon Sep 17 00:00:00 2001 From: leonz789 Date: Tue, 26 Nov 2024 16:57:52 +0800 Subject: [PATCH] lint --- tests/e2e/oracle/data.go | 7 +++---- tests/e2e/oracle/helper_nstconvert.go | 1 - x/oracle/types/types.go | 4 +--- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/e2e/oracle/data.go b/tests/e2e/oracle/data.go index b4fecc37f..32bdbf871 100644 --- a/tests/e2e/oracle/data.go +++ b/tests/e2e/oracle/data.go @@ -38,6 +38,7 @@ func (p priceTime) updateTimestamp() priceTime { return p } +//nolint:all func (p priceTime) generateRealTimeStructs(detID string, sourceID uint64) (priceTime, oracletypes.PriceSource) { retP := p.updateTimestamp() pTimeDetID := retP.getPriceTimeDetID(detID) @@ -70,8 +71,6 @@ var ( Timestamp: time.Now().UTC().Format(layout), } - stakerChanges1 = [][]int{ - []int{0, -4}, - } - priceNST1 = generateNSTPriceTime(stakerChanges1) + stakerChanges1 = [][]int{{0, -4}} + priceNST1 = generateNSTPriceTime(stakerChanges1) ) diff --git a/tests/e2e/oracle/helper_nstconvert.go b/tests/e2e/oracle/helper_nstconvert.go index 2168882e2..57dcb6910 100644 --- a/tests/e2e/oracle/helper_nstconvert.go +++ b/tests/e2e/oracle/helper_nstconvert.go @@ -7,7 +7,6 @@ import ( "github.com/imroc/biu" ) -//nolint:unused func convertBalanceChangeToBytes(stakerChanges [][]int) []byte { if len(stakerChanges) == 0 { // length equals to 0 means that alls takers have efb of 32 with 0 changes diff --git a/x/oracle/types/types.go b/x/oracle/types/types.go index 2d6c989f6..b1b6c2bc1 100644 --- a/x/oracle/types/types.go +++ b/x/oracle/types/types.go @@ -50,9 +50,7 @@ const ( NSTIDPrefix = "NST" ) -var ( - DelimiterForCombinedKey = byte('/') -) +var DelimiterForCombinedKey = byte('/') func Uint64Bytes(value uint64) []byte { valueBytes := make([]byte, 8)