Fix mining after geth 1.9.9 ()

* restore chain head event

* fmt

* restore init
This commit is contained in:
Evgeny Danilenko 2019-12-11 14:54:07 +03:00 committed by GitHub
parent 5b4f352acb
commit 40f1610710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1335,11 +1335,9 @@ func (bc *BlockChain) writeBlockWithState(block *types.Block, receipts []*types.
// canonicial blocks. Avoid firing too much ChainHeadEvents,
// we will fire an accumulated ChainHeadEvent and disable fire
// event here.
// restore if fast sync is needed
// if emitHeadEvent {
// bc.chainHeadFeed.Send(ChainHeadEvent{Block: block})
// }
if emitHeadEvent {
bc.chainHeadFeed.Send(ChainHeadEvent{Block: block})
}
} else {
bc.chainSideFeed.Send(ChainSideEvent{Block: block})
}