diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-19 06:08:57 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-19 06:08:57 +0800 |
commit | 164b878854b58aed833eb704579343099854735f (patch) | |
tree | 7a71713a6447f6a76e8f982f2527e73085473451 /core/chain_manager.go | |
parent | 434dea3caf03515e69858c947ba5e0aad6b9c67a (diff) | |
download | dexon-164b878854b58aed833eb704579343099854735f.tar dexon-164b878854b58aed833eb704579343099854735f.tar.gz dexon-164b878854b58aed833eb704579343099854735f.tar.bz2 dexon-164b878854b58aed833eb704579343099854735f.tar.lz dexon-164b878854b58aed833eb704579343099854735f.tar.xz dexon-164b878854b58aed833eb704579343099854735f.tar.zst dexon-164b878854b58aed833eb704579343099854735f.zip |
cleanup
Diffstat (limited to 'core/chain_manager.go')
-rw-r--r-- | core/chain_manager.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index 8371a129d..4f1e1e68a 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -330,14 +330,13 @@ func (self *ChainManager) GetBlockHashesFromHash(hash common.Hash, max uint64) ( } // XXX Could be optimised by using a different database which only holds hashes (i.e., linked list) for i := uint64(0); i < max; i++ { - parentHash := block.Header().ParentHash - block = self.GetBlock(parentHash) + block = self.GetBlock(block.ParentHash()) if block == nil { break } chain = append(chain, block.Hash()) - if block.Header().Number.Cmp(common.Big0) <= 0 { + if block.Number().Cmp(common.Big0) <= 0 { break } } |