Skip to content

Commit

Permalink
core: write accounts to statedb. Closes #1210
Browse files Browse the repository at this point in the history
  • Loading branch information
obscuren committed Jun 9, 2015
1 parent 0f1cdfa commit a5b977a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
13 changes: 7 additions & 6 deletions core/chain_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ type ChainManager struct {

func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) {
bc := &ChainManager{
blockDb: blockDb,
stateDb: stateDb,
eventMux: mux,
quit: make(chan struct{}),
cache: NewBlockCache(blockCacheLimit),
pow: pow,
blockDb: blockDb,
stateDb: stateDb,
genesisBlock: GenesisBlock(42, stateDb),
eventMux: mux,
quit: make(chan struct{}),
cache: NewBlockCache(blockCacheLimit),
pow: pow,
}

// Check the genesis block given to the chain manager. If the genesis block mismatches block number 0
Expand Down
2 changes: 1 addition & 1 deletion eth/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ func New(config *Config) (*Ethereum, error) {
}

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())
if err != nil {
return nil, err
Expand Down

0 comments on commit a5b977a

Please sign in to comment.