From 58d695f03bfcc0e9df6a287530c9427478a1abe2 Mon Sep 17 00:00:00 2001 From: Ganesha Upadhyaya Date: Sat, 11 Apr 2020 11:50:23 -0700 Subject: [PATCH] port the fix from go-ethereum for interface conversion panic --- core/blockchain.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/blockchain.go b/core/blockchain.go index 255e25e951..2aa3004ed7 100644 --- a/core/blockchain.go +++ b/core/blockchain.go @@ -240,6 +240,9 @@ func NewBlockChain( if bc.genesisBlock == nil { return nil, ErrNoGenesis } + var nilBlock *types.Block + bc.currentBlock.Store(nilBlock) + bc.currentFastBlock.Store(nilBlock) if err := bc.loadLastState(); err != nil { return nil, err }