aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/block_chain.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-16 04:11:05 +0800
committerobscuren <geffobscura@gmail.com>2014-09-16 04:11:05 +0800
commit399256b38403f2e95312250d49fca3cada8956b8 (patch)
tree25ee8bb6334377fb18a39463c8bd85ea7878f641 /ethchain/block_chain.go
parent33a0dec8a157b9687ca6038f4deb011f3f1f7bdc (diff)
downloadgo-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.gz
go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.tar.zst
go-tangerine-399256b38403f2e95312250d49fca3cada8956b8.zip
VM execution fixes
Refactoring caused executing issues
Diffstat (limited to 'ethchain/block_chain.go')
-rw-r--r--ethchain/block_chain.go8
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)