diff options
author | Felix Lange <fjl@twurst.com> | 2015-09-23 18:57:33 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-09-23 18:57:33 +0800 |
commit | 7a2a9180670705cde50844a5a6e4d6825871d60f (patch) | |
tree | 10911fa1faaf3638145e63c8a630cbba6fb80f78 /core/chain_manager.go | |
parent | e456f27795d3d306d4bb52ef0101b9cdad7a27cd (diff) | |
parent | 90cd8ae9f28b7caac93b5c8d555a11e6be90a9eb (diff) | |
download | dexon-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.gz dexon-7a2a9180670705cde50844a5a6e4d6825871d60f.tar.zst dexon-7a2a9180670705cde50844a5a6e4d6825871d60f.zip |
Merge pull request #1842 from fjl/rpc-fix-unknown-block
rpc/api: don't crash for unknown blocks
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 1 |
1 files changed, 1 insertions, 0 deletions
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()) |