core: fix log format

This commit is contained in:
Gary Rong 2025-10-16 11:16:21 +08:00
parent edd380a1d1
commit 42b5737bac

View file

@ -18,6 +18,7 @@ package core
import (
"fmt"
"strings"
"time"
"github.com/ethereum/go-ethereum/common"
@ -118,7 +119,7 @@ DB commit: %v
Block write: %v
Total: %v
State read cache: %s
%s
##############################
`, block.Number(), block.Hash(), len(block.Transactions()), s.MgasPerSecond,
common.PrettyDuration(s.Execution), common.PrettyDuration(s.Validation+s.CrossValidation),
@ -127,5 +128,10 @@ State read cache: %s
common.PrettyDuration(s.AccountHashes+s.AccountCommits+s.AccountUpdates+s.StorageCommits+s.StorageUpdates),
common.PrettyDuration(s.TrieDBCommit+s.SnapshotCommit), common.PrettyDuration(s.BlockWrite),
common.PrettyDuration(s.TotalTime), s.StateReadCacheStats)
log.Info(msg)
log.Info("")
for _, line := range strings.Split(msg, "\n") {
log.Info(line)
}
log.Info("")
}