|
|
@ -412,9 +412,11 @@ func (self *ChainManager) GetBlockHashesFromHash(hash common.Hash, max uint64) ( |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (self *ChainManager) GetBlock(hash common.Hash) *types.Block { |
|
|
|
func (self *ChainManager) GetBlock(hash common.Hash) *types.Block { |
|
|
|
|
|
|
|
/* |
|
|
|
if block := self.cache.Get(hash); block != nil { |
|
|
|
if block := self.cache.Get(hash); block != nil { |
|
|
|
return block |
|
|
|
return block |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
data, _ := self.blockDb.Get(append(blockHashPre, hash[:]...)) |
|
|
|
data, _ := self.blockDb.Get(append(blockHashPre, hash[:]...)) |
|
|
|
if len(data) == 0 { |
|
|
|
if len(data) == 0 { |
|
|
|