diff options
author | obscuren <geffobscura@gmail.com> | 2014-09-16 04:11:05 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-09-16 04:11:05 +0800 |
commit | 399256b38403f2e95312250d49fca3cada8956b8 (patch) | |
tree | 25ee8bb6334377fb18a39463c8bd85ea7878f641 /ethchain/block_chain.go | |
parent | 33a0dec8a157b9687ca6038f4deb011f3f1f7bdc (diff) | |
download | dexon-399256b38403f2e95312250d49fca3cada8956b8.tar dexon-399256b38403f2e95312250d49fca3cada8956b8.tar.gz dexon-399256b38403f2e95312250d49fca3cada8956b8.tar.bz2 dexon-399256b38403f2e95312250d49fca3cada8956b8.tar.lz dexon-399256b38403f2e95312250d49fca3cada8956b8.tar.xz dexon-399256b38403f2e95312250d49fca3cada8956b8.tar.zst dexon-399256b38403f2e95312250d49fca3cada8956b8.zip |
VM execution fixes
Refactoring caused executing issues
Diffstat (limited to 'ethchain/block_chain.go')
-rw-r--r-- | ethchain/block_chain.go | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/ethchain/block_chain.go b/ethchain/block_chain.go index 5d0d652df..1e29f1188 100644 --- a/ethchain/block_chain.go +++ b/ethchain/block_chain.go @@ -148,6 +148,9 @@ func AddTestNetFunds(block *Block) { } func (bc *BlockChain) setLastBlock() { + // Prep genesis + AddTestNetFunds(bc.genesisBlock) + data, _ := ethutil.Config.Db.Get([]byte("LastBlock")) if len(data) != 0 { block := NewBlockFromBytes(data) @@ -155,12 +158,7 @@ func (bc *BlockChain) setLastBlock() { bc.LastBlockHash = block.Hash() bc.LastBlockNumber = block.Number.Uint64() - if bc.LastBlockNumber == 0 { - bc.genesisBlock = block - } } else { - AddTestNetFunds(bc.genesisBlock) - bc.genesisBlock.state.Trie.Sync() // Prepare the genesis block bc.Add(bc.genesisBlock) |