aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-09-25 01:56:21 +0800
committerobscuren <geffobscura@gmail.com>2014-09-25 01:56:21 +0800
commitcba2f6c2c472d5818541f6eabf3e18196d0c477d (patch)
tree22d1940dfbb608e11ae2fc1ad6a11f0d8f69bbef
parent1fe2d0d0e011b6d6bc6261b69fe955943d9d6e3e (diff)
downloaddexon-cba2f6c2c472d5818541f6eabf3e18196d0c477d.tar.gz
dexon-cba2f6c2c472d5818541f6eabf3e18196d0c477d.tar.zst
dexon-cba2f6c2c472d5818541f6eabf3e18196d0c477d.zip
Block pool stop / start
-rw-r--r--ethereum.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/ethereum.go b/ethereum.go
index 8f667b786..d04b08960 100644
--- a/ethereum.go
+++ b/ethereum.go
@@ -158,6 +158,9 @@ func (s *Ethereum) StateManager() *ethchain.StateManager {
func (s *Ethereum) TxPool() *ethchain.TxPool {
return s.txPool
}
+func (s *Ethereum) BlockPool() *BlockPool {
+ return s.blockPool
+}
func (self *Ethereum) Db() ethutil.Database {
return self.db
}
@@ -383,6 +386,7 @@ func (s *Ethereum) ReapDeadPeerHandler() {
// Start the ethereum
func (s *Ethereum) Start(seed bool) {
s.reactor.Start()
+ s.blockPool.Start()
// Bind to addr and port
ln, err := net.Listen("tcp", ":"+s.Port)
if err != nil {
@@ -503,6 +507,7 @@ func (s *Ethereum) Stop() {
s.stateManager.Stop()
s.reactor.Flush()
s.reactor.Stop()
+ s.blockPool.Stop()
ethlogger.Infoln("Server stopped")
close(s.shutdownChan)