mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
s/OnBlockchainTerminate/OnClose
This commit is contained in:
parent
a6541d2e57
commit
a2639b2fde
2 changed files with 9 additions and 13 deletions
|
|
@ -1161,10 +1161,6 @@ func (bc *BlockChain) Stop() {
|
||||||
if err := bc.triedb.Close(); err != nil {
|
if err := bc.triedb.Close(); err != nil {
|
||||||
log.Error("Failed to close trie database", "err", err)
|
log.Error("Failed to close trie database", "err", err)
|
||||||
}
|
}
|
||||||
// Allow tracers to clean-up and release resources.
|
|
||||||
if bc.vmConfig.Tracer != nil && bc.vmConfig.Tracer.OnBlockchainTerminate != nil {
|
|
||||||
bc.vmConfig.Tracer.OnBlockchainTerminate()
|
|
||||||
}
|
|
||||||
log.Info("Blockchain stopped")
|
log.Info("Blockchain stopped")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,14 +78,14 @@ func newSupply(cfg json.RawMessage) (*tracing.Hooks, error) {
|
||||||
logger: logger,
|
logger: logger,
|
||||||
}
|
}
|
||||||
return &tracing.Hooks{
|
return &tracing.Hooks{
|
||||||
OnBlockStart: t.OnBlockStart,
|
OnBlockStart: t.OnBlockStart,
|
||||||
OnBlockEnd: t.OnBlockEnd,
|
OnBlockEnd: t.OnBlockEnd,
|
||||||
OnGenesisBlock: t.OnGenesisBlock,
|
OnGenesisBlock: t.OnGenesisBlock,
|
||||||
OnTxStart: t.OnTxStart,
|
OnTxStart: t.OnTxStart,
|
||||||
OnBalanceChange: t.OnBalanceChange,
|
OnBalanceChange: t.OnBalanceChange,
|
||||||
OnEnter: t.OnEnter,
|
OnEnter: t.OnEnter,
|
||||||
OnExit: t.OnExit,
|
OnExit: t.OnExit,
|
||||||
OnBlockchainTerminate: t.OnBlockchainTerminate,
|
OnClose: t.OnClose,
|
||||||
}, nil
|
}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -230,7 +230,7 @@ func (s *supply) OnExit(depth int, output []byte, gasUsed uint64, err error, rev
|
||||||
s.txCallstack[size-1].calls = append(s.txCallstack[size-1].calls, call)
|
s.txCallstack[size-1].calls = append(s.txCallstack[size-1].calls, call)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *supply) OnBlockchainTerminate() {
|
func (s *supply) OnClose() {
|
||||||
if err := s.logger.Close(); err != nil {
|
if err := s.logger.Close(); err != nil {
|
||||||
log.Warn("failed to close supply tracer log file", "error", err)
|
log.Warn("failed to close supply tracer log file", "error", err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue