Fix mining after geth 1.9.9 (#255)

* 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, // canonicial blocks. Avoid firing too much ChainHeadEvents,
// we will fire an accumulated ChainHeadEvent and disable fire // we will fire an accumulated ChainHeadEvent and disable fire
// event here. // event here.
if emitHeadEvent {
// restore if fast sync is needed bc.chainHeadFeed.Send(ChainHeadEvent{Block: block})
// if emitHeadEvent { }
// bc.chainHeadFeed.Send(ChainHeadEvent{Block: block})
// }
} else { } else {
bc.chainSideFeed.Send(ChainSideEvent{Block: block}) bc.chainSideFeed.Send(ChainSideEvent{Block: block})
} }