mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 06:36:43 +00:00
tmp slow block
This commit is contained in:
parent
edb151ab71
commit
e65d1766a3
2 changed files with 9 additions and 0 deletions
|
|
@ -33,6 +33,7 @@ import (
|
|||
"github.com/ethereum/go-ethereum/common"
|
||||
"github.com/ethereum/go-ethereum/core"
|
||||
"github.com/ethereum/go-ethereum/core/state"
|
||||
"github.com/ethereum/go-ethereum/core/vm"
|
||||
"github.com/ethereum/go-ethereum/crypto"
|
||||
"github.com/ethereum/go-ethereum/eth"
|
||||
"github.com/ethereum/go-ethereum/ethdb"
|
||||
|
|
@ -624,6 +625,8 @@ func MakeNode(ctx *cli.Context, name, gitCommit string) *node.Node {
|
|||
WSOrigins: ctx.GlobalString(WSAllowedOriginsFlag.Name),
|
||||
WSModules: MakeRPCModules(ctx.GlobalString(WSApiFlag.Name)),
|
||||
}
|
||||
vm.SetJITCacheSize(ctx.GlobalInt(VMCacheFlag.Name))
|
||||
|
||||
if ctx.GlobalBool(DevModeFlag.Name) {
|
||||
if !ctx.GlobalIsSet(DataDirFlag.Name) {
|
||||
config.DataDir = filepath.Join(os.TempDir(), "/ethereum_dev_mode")
|
||||
|
|
|
|||
|
|
@ -981,6 +981,12 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
|
|||
}
|
||||
|
||||
stats.processed++
|
||||
if time.Since(bstart) > 1200*time.Millisecond {
|
||||
glog.Infof("#### inserted slow block ####")
|
||||
glog.Infof("[%v] inserted block #%d (%d TXs %v G %d UNCs) (%x...). Took %v\n", time.Now().UnixNano(), block.Number(), len(block.Transactions()), block.GasUsed(), len(block.Uncles()), block.Hash().Bytes()[0:4], time.Since(bstart))
|
||||
glog.Infof("#############################")
|
||||
}
|
||||
|
||||
if glog.V(logger.Info) {
|
||||
stats.usedGas += usedGas.Uint64()
|
||||
stats.report(chain, i)
|
||||
|
|
|
|||
Loading…
Reference in a new issue