aboutsummaryrefslogtreecommitdiffstats
path: root/core/chain_manager.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2015-09-23 18:57:33 +0800
committerFelix Lange <fjl@twurst.com>2015-09-23 18:57:33 +0800
commit7a2a9180670705cde50844a5a6e4d6825871d60f (patch)
tree10911fa1faaf3638145e63c8a630cbba6fb80f78 /core/chain_manager.go
parente456f27795d3d306d4bb52ef0101b9cdad7a27cd (diff)
parent90cd8ae9f28b7caac93b5c8d555a11e6be90a9eb (diff)
downloaddexon-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.go1
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())