etclabscore / core-geth

A highly configurable Go implementation of the Ethereum protocol.
https://etclabscore.github.io/core-geth
GNU Lesser General Public License v3.0
267 stars 147 forks source link

Fix/miner downloader autopause #596

Closed meowsbits closed 9 months ago

meowsbits commented 9 months ago

Read https://github.com/ethereum/devp2p/blob/master/caps/eth.md#block-propagation.

This patch infers "synced" status by the successful status of a BlockFetcher-directed chain insertion.

The BlockFetcher type exclusively handles the (optional) fetching and (always) importing of block(s) received via the following wire protocol messages.

If a block is successfully inserted into our local chain by these means, the miner infers that we are synced, and disables the autopause-for-downloader-events mechanism.

Resolves #586