diff options
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) |