aboutsummaryrefslogtreecommitdiffstats
path: root/eth/backend.go
diff options
context:
space:
mode:
Diffstat (limited to 'eth/backend.go')
-rw-r--r--eth/backend.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/eth/backend.go b/eth/backend.go
index 983dd8e4f..791336d75 100644
--- a/eth/backend.go
+++ b/eth/backend.go
@@ -259,8 +259,8 @@ func New(config *Config) (*Ethereum, error) {
}
eth.chainManager = core.NewChainManager(blockDb, stateDb, eth.EventMux())
- eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.InsertChain)
- eth.pow = ethash.New(eth.chainManager)
+ eth.downloader = downloader.New(eth.chainManager.HasBlock, eth.chainManager.GetBlock)
+ eth.pow = ethash.New()
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.chainManager.SetProcessor(eth.blockProcessor)
@@ -319,8 +319,8 @@ func (s *Ethereum) NodeInfo() *NodeInfo {
NodeUrl: node.String(),
NodeID: node.ID.String(),
IP: node.IP.String(),
- DiscPort: node.DiscPort,
- TCPPort: node.TCPPort,
+ DiscPort: int(node.UDP),
+ TCPPort: int(node.TCP),
ListenAddr: s.net.ListenAddr,
Td: s.ChainManager().Td().String(),
}
@@ -360,7 +360,6 @@ func (s *Ethereum) PeersInfo() (peersinfo []*PeerInfo) {
func (s *Ethereum) ResetWithGenesisBlock(gb *types.Block) {
s.chainManager.ResetWithGenesisBlock(gb)
- s.pow.UpdateCache(0, true)
}
func (s *Ethereum) StartMining() error {
@@ -500,6 +499,7 @@ func (s *Ethereum) Stop() {
s.txSub.Unsubscribe() // quits txBroadcastLoop
s.protocolManager.Stop()
+ s.chainManager.Stop()
s.txPool.Stop()
s.eventMux.Stop()
if s.whisper != nil {