mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 21:26:42 +00:00
post chainheadevent in miner/worker
This commit is contained in:
parent
91eb750501
commit
ea00f689ec
1 changed files with 3 additions and 3 deletions
|
|
@ -275,13 +275,13 @@ func (self *worker) wait() {
|
|||
glog.V(logger.Info).Infof("🔨 Mined %sblock (#%v / %x). %s", stale, block.Number(), block.Hash().Bytes()[:4], confirm)
|
||||
|
||||
// broadcast before waiting for validation
|
||||
go func() {
|
||||
go func(block *types.Block, logs state.Logs) {
|
||||
self.mux.Post(core.NewMinedBlockEvent{block})
|
||||
self.mux.Post(core.ChainEvent{block, block.Hash(), self.current.state.Logs()})
|
||||
self.mux.Post(core.ChainEvent{block, block.Hash(), logs})
|
||||
if stat == core.CanonStatTy {
|
||||
self.mux.Post(core.ChainHeadEvent{block})
|
||||
}
|
||||
}()
|
||||
}(block, self.current.state.Logs())
|
||||
|
||||
self.commitNewWork()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue