Commit a5b977aa authored by obscuren's avatar obscuren

core: write accounts to statedb. Closes #1210

parent 0f1cdfa5
...@@ -113,6 +113,7 @@ func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow ...@@ -113,6 +113,7 @@ func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow
bc := &ChainManager{ bc := &ChainManager{
blockDb: blockDb, blockDb: blockDb,
stateDb: stateDb, stateDb: stateDb,
genesisBlock: GenesisBlock(42, stateDb),
eventMux: mux, eventMux: mux,
quit: make(chan struct{}), quit: make(chan struct{}),
cache: NewBlockCache(blockCacheLimit), cache: NewBlockCache(blockCacheLimit),
......
...@@ -285,7 +285,7 @@ func New(config *Config) (*Ethereum, error) { ...@@ -285,7 +285,7 @@ func New(config *Config) (*Ethereum, error) {
} }
eth.pow = ethash.New() eth.pow = ethash.New()
genesis := core.GenesisBlock(uint64(config.GenesisNonce), blockDb) genesis := core.GenesisBlock(uint64(config.GenesisNonce), stateDb)
eth.chainManager, err = core.NewChainManager(genesis, blockDb, stateDb, eth.pow, eth.EventMux()) eth.chainManager, err = core.NewChainManager(genesis, blockDb, stateDb, eth.pow, eth.EventMux())
if err != nil { if err != nil {
return nil, err return nil, err
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment