diff options
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 4bbecd109..e6268c01e 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -101,7 +101,10 @@ func NewChainManager(mux *event.TypeMux) *ChainManager { } func (self *ChainManager) Status() (td *big.Int, currentBlock []byte, genesisBlock []byte) { - return self.TD, self.CurrentBlock.Hash(), self.Genesis().Hash() + self.mu.RLock() + defer self.mu.RUnlock() + + return self.td, self.currentBlock.Hash(), self.Genesis().Hash() } func (self *ChainManager) SetProcessor(proc types.BlockProcessor) { |