OSDN Git Service

clean up
authorHAOYUatHZ <haoyu@protonmail.com>
Tue, 27 Aug 2019 07:48:36 +0000 (15:48 +0800)
committerHAOYUatHZ <haoyu@protonmail.com>
Tue, 27 Aug 2019 07:48:36 +0000 (15:48 +0800)
toolbar/precog/monitor/monitor.go

index 96e40db..3057261 100644 (file)
@@ -7,7 +7,6 @@ import (
        "os/user"
        "strings"
        "sync"
-       // "time"
 
        "github.com/jinzhu/gorm"
        log "github.com/sirupsen/logrus"
@@ -18,9 +17,8 @@ import (
        "github.com/vapor/event"
        "github.com/vapor/netsync/chainmgr"
        "github.com/vapor/netsync/consensusmgr"
-       "github.com/vapor/p2p"
-       // msgs "github.com/vapor/netsync/messages"
        "github.com/vapor/netsync/peers"
+       "github.com/vapor/p2p"
        "github.com/vapor/p2p/discover/dht"
        "github.com/vapor/p2p/discover/mdns"
        "github.com/vapor/p2p/signlib"
@@ -201,12 +199,6 @@ func (m *monitor) checkStatusRoutine() {
                log.Info("bestHeight: ", bestHeight)
                m.processPeerInfos(peers.GetPeerInfos())
 
-               // TODO:
-               // msg := struct{ msgs.BlockchainMessage }{&msgs.GetBlockMessage{Height: bestHeight + 1}}
-               // for _, peer := range m.sw.GetPeers().List() {
-               //      peers.SendMsg(peer.ID(), msgs.BlockchainChannel, msg)
-               // }
-
                for _, peer := range m.sw.GetPeers().List() {
                        p := peers.GetPeer(peer.ID())
                        if p == nil {