ethereumproject / go-ethereum

Go language implementation of the original/classic design of the Ethereum protocol
GNU Lesser General Public License v3.0
441 stars 166 forks source link

Mined blocks rolled back after quit #721

Closed Yiran-Chen closed 5 years ago

Yiran-Chen commented 5 years ago

Environment

Geth 1.8.27 Linux Docker 18.09.0

Options

--gcmode full --dev

Issue

The latest block 701 was mined, then I shutdown my computer. When I restart, the latest block become 645 (eth.blockNumber is 645), I still can get block data of 646 - 701 (eth.getBlock(646) ... eth.getBlock(701) still return old data) but they are no longer a part of the chain, newly mined blocks will replace the old blocks and link to 645. Is it because the gcmode is enabled and the data of 645 - 701 was not flushed to disk ? Is there a way to "reset the head" to the old 701 , since old data was not lost?