rename pushGossip to queueGossip for accuracy.

This commit is contained in:
Raúl Kripalani 2019-10-06 18:53:05 +09:00
parent 9103afa349
commit 2a90debb89

View File

@ -535,7 +535,7 @@ func (gs *GossipSubRouter) emitGossip(topic string, exclude map[peer.ID]struct{}
// Emit the IHAVE gossip to the selected peers. // Emit the IHAVE gossip to the selected peers.
for _, p := range gpeers { for _, p := range gpeers {
gs.pushGossip(p, &pb.ControlIHave{TopicID: &topic, MessageIDs: mids}) gs.queueGossip(p, &pb.ControlIHave{TopicID: &topic, MessageIDs: mids})
} }
} }
@ -555,7 +555,7 @@ func (gs *GossipSubRouter) flush() {
} }
} }
func (gs *GossipSubRouter) pushGossip(p peer.ID, ihave *pb.ControlIHave) { func (gs *GossipSubRouter) queueGossip(p peer.ID, ihave *pb.ControlIHave) {
gossip := gs.gossip[p] gossip := gs.gossip[p]
gossip = append(gossip, ihave) gossip = append(gossip, ihave)
gs.gossip[p] = gossip gs.gossip[p] = gossip