diff options
author | obscuren <geffobscura@gmail.com> | 2014-12-18 20:22:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-12-18 20:22:59 +0800 |
commit | 0dc566124aee24cf3f01b4e586bde7752da89824 (patch) | |
tree | 22bfe271447f8b42598b3066cb92d87df93c7095 /core/chain_manager.go | |
parent | 721e8ae93f9b8918ff4bc74af86c530bacacea00 (diff) | |
download | go-tangerine-0dc566124aee24cf3f01b4e586bde7752da89824.tar.gz go-tangerine-0dc566124aee24cf3f01b4e586bde7752da89824.tar.zst go-tangerine-0dc566124aee24cf3f01b4e586bde7752da89824.zip |
Merge fixes
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) { |