Merge pull request #1211 from obscuren/genesis_writout_fix
core: write accounts to statedb. Closes #1210
This commit is contained in:
commit
11f65cf885
@ -111,12 +111,13 @@ type ChainManager struct {
|
|||||||
|
|
||||||
func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) {
|
func NewChainManager(genesis *types.Block, blockDb, stateDb common.Database, pow pow.PoW, mux *event.TypeMux) (*ChainManager, error) {
|
||||||
bc := &ChainManager{
|
bc := &ChainManager{
|
||||||
blockDb: blockDb,
|
blockDb: blockDb,
|
||||||
stateDb: stateDb,
|
stateDb: stateDb,
|
||||||
eventMux: mux,
|
genesisBlock: GenesisBlock(42, stateDb),
|
||||||
quit: make(chan struct{}),
|
eventMux: mux,
|
||||||
cache: NewBlockCache(blockCacheLimit),
|
quit: make(chan struct{}),
|
||||||
pow: pow,
|
cache: NewBlockCache(blockCacheLimit),
|
||||||
|
pow: pow,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Check the genesis block given to the chain manager. If the genesis block mismatches block number 0
|
// Check the genesis block given to the chain manager. If the genesis block mismatches block number 0
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user