core: remove unused var

This commit is contained in:
Gary Rong 2025-09-30 23:30:09 +08:00
parent 445496de0c
commit 2c25cf362a
2 changed files with 1 additions and 6 deletions

View file

@ -111,11 +111,6 @@ var (
errChainStopped = errors.New("blockchain is stopped") errChainStopped = errors.New("blockchain is stopped")
errInvalidOldChain = errors.New("invalid old chain") errInvalidOldChain = errors.New("invalid old chain")
errInvalidNewChain = errors.New("invalid new 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 ( var (

View file

@ -102,7 +102,7 @@ func (s *ExecuteStats) logSlow(block *types.Block, slowBlockThreshold uint64) {
if slowBlockThreshold == 0 || s.MgasPerSecond == 0 { if slowBlockThreshold == 0 || s.MgasPerSecond == 0 {
return return
} }
if s.MgasPerSecond > slowBlockProcessThreshold { if s.MgasPerSecond > float64(slowBlockThreshold) {
return return
} }
msg := fmt.Sprintf(` msg := fmt.Sprintf(`