From 70b6174748585be2dd4b132203cda8655b76251b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 22 Sep 2015 23:55:31 +0200 Subject: 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. --- core/chain_manager.go | 1 + 1 file changed, 1 insertion(+) (limited to 'core') diff --git a/core/chain_manager.go b/core/chain_manager.go index 42f70af33..0ad4f86f9 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -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()) -- cgit