|
|
@ -220,7 +220,7 @@ func New(config *Config) (*Ethereum, error) { |
|
|
|
|
|
|
|
|
|
|
|
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux()) |
|
|
|
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux()) |
|
|
|
eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.GetBlock) |
|
|
|
eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.GetBlock) |
|
|
|
eth.pow = ethash.New(eth.chainManager) |
|
|
|
eth.pow = ethash.New() |
|
|
|
eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit) |
|
|
|
eth.txPool = core.NewTxPool(eth.EventMux(), eth.chainManager.State, eth.chainManager.GasLimit) |
|
|
|
eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux()) |
|
|
|
eth.blockProcessor = core.NewBlockProcessor(stateDb, extraDb, eth.pow, eth.txPool, eth.chainManager, eth.EventMux()) |
|
|
|
eth.chainManager.SetProcessor(eth.blockProcessor) |
|
|
|
eth.chainManager.SetProcessor(eth.blockProcessor) |
|
|
@ -318,7 +318,6 @@ func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) { |
|
|
|
|
|
|
|
|
|
|
|
func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { |
|
|
|
func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) { |
|
|
|
s.chainManager.ResetWithGenesisBlock(gb) |
|
|
|
s.chainManager.ResetWithGenesisBlock(gb) |
|
|
|
s.pow.UpdateCache(0, true) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
func (s *Ethereum) StartMining() error { |
|
|
|
func (s *Ethereum) StartMining() error { |
|
|
|