cmd/geth, core: make "geth blocktest" work again
The test genesis block was not written properly, block insertion failed immediately. While here, fix the panic when shutting down "geth blocktest" with Ctrl+C. The signal handler is now installed automatically, causing ethereum.Stop to crash because everything is already stopped.
This commit is contained in:
@ -279,6 +279,7 @@ func (bc *ChainManager) ResetWithGenesisBlock(genesis *types.Block) {
|
||||
if err := WriteBlock(bc.chainDb, genesis); err != nil {
|
||||
glog.Fatalf("failed to write genesis block: %v", err)
|
||||
}
|
||||
bc.genesisBlock = genesis
|
||||
bc.insert(bc.genesisBlock)
|
||||
bc.currentBlock = bc.genesisBlock
|
||||
bc.setTotalDifficulty(genesis.Difficulty())
|
||||
|
Reference in New Issue
Block a user