From 0dc566124aee24cf3f01b4e586bde7752da89824 Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 18 Dec 2014 13:22:59 +0100 Subject: Merge fixes --- core/chain_manager.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'core/chain_manager.go') 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) { -- cgit