Commit cba2f6c2 authored by obscuren's avatar obscuren

Block pool stop / start

parent 1fe2d0d0
...@@ -158,6 +158,9 @@ func (s *Ethereum) StateManager() *ethchain.StateManager { ...@@ -158,6 +158,9 @@ func (s *Ethereum) StateManager() *ethchain.StateManager {
func (s *Ethereum) TxPool() *ethchain.TxPool { func (s *Ethereum) TxPool() *ethchain.TxPool {
return s.txPool return s.txPool
} }
func (s *Ethereum) BlockPool() *BlockPool {
return s.blockPool
}
func (self *Ethereum) Db() ethutil.Database { func (self *Ethereum) Db() ethutil.Database {
return self.db return self.db
} }
...@@ -383,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() { ...@@ -383,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() {
// Start the ethereum // Start the ethereum
func (s *Ethereum) Start(seed bool) { func (s *Ethereum) Start(seed bool) {
s.reactor.Start() s.reactor.Start()
s.blockPool.Start()
// Bind to addr and port // Bind to addr and port
ln, err := net.Listen("tcp", ":"+s.Port) ln, err := net.Listen("tcp", ":"+s.Port)
if err != nil { if err != nil {
...@@ -503,6 +507,7 @@ func (s *Ethereum) Stop() { ...@@ -503,6 +507,7 @@ func (s *Ethereum) Stop() {
s.stateManager.Stop() s.stateManager.Stop()
s.reactor.Flush() s.reactor.Flush()
s.reactor.Stop() s.reactor.Stop()
s.blockPool.Stop()
ethlogger.Infoln("Server stopped") ethlogger.Infoln("Server stopped")
close(s.shutdownChan) close(s.shutdownChan)
......
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