diff options
author | zsfelfoldi <zsfelfoldi@gmail.com> | 2016-04-05 21:22:04 +0800 |
---|---|---|
committer | zsfelfoldi <zsfelfoldi@gmail.com> | 2016-06-07 22:38:56 +0800 |
commit | f9917c8c7b6d16daadebd72977e56a8adc0382b0 (patch) | |
tree | eb11524c618a44dbd499918761ba176a9addba58 /core/vm_env.go | |
parent | 5a458da42ae9a6525989c2d4515c6fa573ba8f8c (diff) | |
download | dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.gz dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.bz2 dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.lz dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.xz dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.tar.zst dexon-f9917c8c7b6d16daadebd72977e56a8adc0382b0.zip |
core: improved chainDb using sequential keys
Diffstat (limited to 'core/vm_env.go')
-rw-r--r-- | core/vm_env.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/vm_env.go b/core/vm_env.go index f50140c68..599672382 100644 --- a/core/vm_env.go +++ b/core/vm_env.go @@ -30,7 +30,7 @@ import ( // to query for information. func GetHashFn(ref common.Hash, chain *BlockChain) func(n uint64) common.Hash { return func(n uint64) common.Hash { - for block := chain.GetBlock(ref); block != nil; block = chain.GetBlock(block.ParentHash()) { + for block := chain.GetBlockByHash(ref); block != nil; block = chain.GetBlock(block.ParentHash(), block.NumberU64()-1) { if block.NumberU64() == n { return block.Hash() } |