aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coreth.go3
-rw-r--r--eth/backend.go13
2 files changed, 14 insertions, 2 deletions
diff --git a/coreth.go b/coreth.go
index 5c739c1..0f65ca9 100644
--- a/coreth.go
+++ b/coreth.go
@@ -46,12 +46,11 @@ func NewETHChain(config *eth.Config, etherBase *common.Address) *ETHChain {
}
func (self *ETHChain) Start() {
- //utils.StartNode(stack)
self.backend.StartMining(0)
}
func (self *ETHChain) Stop() {
- self.backend.Stop()
+ self.backend.StopPart()
}
func (self *ETHChain) AddRemoteTxs(txs []*types.Transaction) []error {
diff --git a/eth/backend.go b/eth/backend.go
index 12041de..16780cc 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -532,3 +532,16 @@ func (s *Ethereum) Stop() error {
close(s.shutdownChan)
return nil
}
+
+func (s *Ethereum) StopPart() error {
+ s.bloomIndexer.Close()
+ s.blockchain.Stop()
+ s.engine.Close()
+ s.txPool.Stop()
+ s.miner.Stop()
+ s.eventMux.Stop()
+
+ s.chainDb.Close()
+ close(s.shutdownChan)
+ return nil
+}