OSDN Git Service

dispatch signature when proccess block (#85)
[bytom/vapor.git] / node / node.go
index 92a4593..01e901f 100644 (file)
@@ -29,7 +29,6 @@ import (
        "github.com/vapor/mining/cpuminer"
        "github.com/vapor/net/websocket"
        "github.com/vapor/netsync"
-       "github.com/vapor/p2p"
        "github.com/vapor/protocol"
        w "github.com/vapor/wallet"
 )
@@ -79,7 +78,7 @@ func NewNode(config *cfg.Config) *Node {
 
        dispatcher := event.NewDispatcher()
        txPool := protocol.NewTxPool(store, dispatcher)
-       chain, err := protocol.NewChain(store, txPool)
+       chain, err := protocol.NewChain(store, txPool, dispatcher)
        if err != nil {
                cmn.Exit(cmn.Fmt("Failed to create chain structure: %v", err))
        }
@@ -257,7 +256,3 @@ func (n *Node) RunForever() {
                n.Stop()
        })
 }
-
-func (n *Node) NodeInfo() *p2p.NodeInfo {
-       return n.syncManager.NodeInfo()
-}