remove dead code
This commit is contained in:
1 parent
eafe17255b
commit
62c6242840
1 file changed
-16
@@ -120,7 +120,6 @@ const (
|
|||||||
PAddConnection = iota
|
PAddConnection = iota
|
||||||
PConnectionEstablished
|
PConnectionEstablished
|
||||||
PDeleteConnection
|
PDeleteConnection
|
||||||
PSendProtocolMsg
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// Sync.
|
// Sync.
|
||||||
@@ -148,13 +147,6 @@ func (peer *LocalPeer) DeleteConnection(conn *LocalConnection) {
|
|||||||
<-resultChan
|
<-resultChan
|
||||||
}
|
}
|
||||||
|
|
||||||
// Async.
|
|
||||||
func (peer *LocalPeer) SendProtocolMsg(m ProtocolMsg) {
|
|
||||||
peer.queryChan <- &PeerInteraction{
|
|
||||||
Interaction: Interaction{code: PSendProtocolMsg},
|
|
||||||
payload: m}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ACTOR server
|
// ACTOR server
|
||||||
|
|
||||||
func (peer *LocalPeer) queryLoop(queryChan <-chan *PeerInteraction) {
|
func (peer *LocalPeer) queryLoop(queryChan <-chan *PeerInteraction) {
|
||||||
@@ -183,8 +175,6 @@ func (peer *LocalPeer) queryLoop(queryChan <-chan *PeerInteraction) {
|
|||||||
conn.log("connection deleted")
|
conn.log("connection deleted")
|
||||||
}
|
}
|
||||||
query.resultChan <- nil
|
query.resultChan <- nil
|
||||||
case PSendProtocolMsg:
|
|
||||||
peer.handleSendProtocolMsg(query.payload.(ProtocolMsg))
|
|
||||||
}
|
}
|
||||||
case <-gossipTimer:
|
case <-gossipTimer:
|
||||||
peer.Router.SendAllGossip()
|
peer.Router.SendAllGossip()
|
||||||
@@ -263,12 +253,6 @@ func (peer *LocalPeer) handleDeleteConnection(conn Connection) bool {
|
|||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
func (peer *LocalPeer) handleSendProtocolMsg(m ProtocolMsg) {
|
|
||||||
peer.ForEachConnection(func(_ PeerName, conn Connection) {
|
|
||||||
conn.(ProtocolSender).SendProtocolMsg(m)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) {
|
func (peer *LocalPeer) broadcastPeerUpdate(peers ...*Peer) {
|
||||||
peer.Router.Routes.Recalculate()
|
peer.Router.Routes.Recalculate()
|
||||||
// TODO We should just be invoking TopologyGossip.GossipBroadcast
|
// TODO We should just be invoking TopologyGossip.GossipBroadcast
|
||||||
|
|||||||
Reference in new issue
Block a user