diff options
author | obscuren <geffobscura@gmail.com> | 2015-01-29 04:50:10 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-01-29 04:50:10 +0800 |
commit | fd5d061d49ae32db3ebf8b8e6a14380742701661 (patch) | |
tree | 6b991781e4b5c7ebae726195f6b99b0edb807da0 /core | |
parent | 5e891ea981aabc1435c54decc1572788d3358954 (diff) | |
parent | 1337a8dfb11160d67db410b71af92a02d6b232f5 (diff) | |
download | go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar.gz go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar.bz2 go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar.lz go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar.xz go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.tar.zst go-tangerine-fd5d061d49ae32db3ebf8b8e6a14380742701661.zip |
Merge branch 'develop' into Gustav-Simonsson-key_store_and_accounts_integration
Diffstat (limited to 'core')
-rw-r--r-- | core/chain_manager.go | 8 | ||||
-rw-r--r-- | core/genesis.go | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/core/chain_manager.go b/core/chain_manager.go index c68b7cfc2..9646bfc53 100644 --- a/core/chain_manager.go +++ b/core/chain_manager.go @@ -251,7 +251,13 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain // XXX Could be optimised by using a different database which only holds hashes (i.e., linked list) for i := uint64(0); i < max; i++ { - block = self.GetBlock(block.Header().ParentHash) + parentHash := block.Header().ParentHash + block = self.GetBlock(parentHash) + if block == nil { + chainlogger.Infof("GetBlockHashesFromHash Parent UNKNOWN %x\n", parentHash) + break + } + chain = append(chain, block.Hash()) if block.Header().Number.Cmp(ethutil.Big0) <= 0 { break diff --git a/core/genesis.go b/core/genesis.go index d9edaace2..6d4eeba72 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -34,7 +34,7 @@ func GenesisBlock(db ethutil.Database) *types.Block { statedb := state.New(genesis.Root(), db) //statedb := state.New(genesis.Trie()) for _, addr := range []string{ - "51ba59315b3a95761d0863b05ccc7a7f54703d99", + "dbdbdb2cbd23b783741e8d7fcf51e459b497e4a6", "e4157b34ea9615cfbde6b4fda419828124b70c78", "b9c015918bdaba24b4ff057a92a3873d6eb201be", "6c386a4b26f73c802f34673f7248bb118f97424a", |