Merge pull request #1569 from obscuren/default-genesis
core: added default genesis block
This commit is contained in:
commit
db988a46dd
@ -98,7 +98,15 @@ func NewChainManager(blockDb, stateDb, extraDb common.Database, pow pow.PoW, mux
|
||||
|
||||
bc.genesisBlock = bc.GetBlockByNumber(0)
|
||||
if bc.genesisBlock == nil {
|
||||
return nil, ErrNoGenesis
|
||||
reader, err := NewDefaultGenesisReader()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
bc.genesisBlock, err = WriteGenesisBlock(stateDb, blockDb, reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
glog.V(logger.Info).Infoln("WARNING: Wrote default ethereum genesis block")
|
||||
}
|
||||
|
||||
if err := bc.setLastState(); err != nil {
|
||||
|
30
core/default_genesis.go
Normal file
30
core/default_genesis.go
Normal file
File diff suppressed because one or more lines are too long
@ -135,7 +135,7 @@ func (pool *TxPool) resetState() {
|
||||
func (pool *TxPool) Stop() {
|
||||
close(pool.quit)
|
||||
pool.events.Unsubscribe()
|
||||
glog.V(logger.Info).Infoln("TX Pool stopped")
|
||||
glog.V(logger.Info).Infoln("Transaction pool stopped")
|
||||
}
|
||||
|
||||
func (pool *TxPool) State() *state.ManagedState {
|
||||
|
Loading…
Reference in New Issue
Block a user