From 3ff010dfada17b1e8a1a043bdaa2e7281a927e47 Mon Sep 17 00:00:00 2001 From: jinoosss Date: Wed, 27 Nov 2024 12:49:48 +0900 Subject: [PATCH] fix: fix a lint --- serve/methods/gas.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/serve/methods/gas.go b/serve/methods/gas.go index ef1f8be..96dca39 100644 --- a/serve/methods/gas.go +++ b/serve/methods/gas.go @@ -68,7 +68,7 @@ func calculateGasFeePerBlock(block *types.Block) map[string]*gasFeeTotalInfo { } // calculateGasFee merges the gas fee statistics from a block into the global statistics. -func calculateGasFee(currentInfo *gasFeeTotalInfo, blockInfo *gasFeeTotalInfo) *gasFeeTotalInfo { +func calculateGasFee(currentInfo, blockInfo *gasFeeTotalInfo) *gasFeeTotalInfo { if currentInfo == nil { currentInfo = &gasFeeTotalInfo{} } @@ -107,6 +107,7 @@ func min(current, newValue int64) int64 { if current == 0 || newValue < current { return newValue } + return current } @@ -115,5 +116,6 @@ func max(current, newValue int64) int64 { if newValue > current { return newValue } + return current }