From 2c25cf362ab248a3922e21a60af5a8909508c0cb Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 30 Sep 2025 23:30:09 +0800 Subject: [PATCH] core: remove unused var --- core/blockchain.go | 5 ----- core/blockchain_stats.go | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/core/blockchain.go b/core/blockchain.go index 7dad0bf0ed..70a23c583d 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -111,11 +111,6 @@ var ( errChainStopped = errors.New("blockchain is stopped") errInvalidOldChain = errors.New("invalid old chain") errInvalidNewChain = errors.New("invalid new chain") - - // slowBlockProcessThreshold defines the threshold (10 Mgas per second) for - // considering a block execution as slow. Detailed performance metrics will be - // printed if debug mode is enabled. - slowBlockProcessThreshold = float64(10) ) var ( diff --git a/core/blockchain_stats.go b/core/blockchain_stats.go index daecfd3be5..b11793f02d 100644 --- a/core/blockchain_stats.go +++ b/core/blockchain_stats.go @@ -102,7 +102,7 @@ func (s *ExecuteStats) logSlow(block *types.Block, slowBlockThreshold uint64) { if slowBlockThreshold == 0 || s.MgasPerSecond == 0 { return } - if s.MgasPerSecond > slowBlockProcessThreshold { + if s.MgasPerSecond > float64(slowBlockThreshold) { return } msg := fmt.Sprintf(`