From 4427c3def700dad0f7273ee0543182db04163b1e Mon Sep 17 00:00:00 2001 From: Yusef Napora Date: Tue, 5 May 2020 20:18:23 -0400 Subject: [PATCH] fix prune message in test --- gossipsub_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gossipsub_test.go b/gossipsub_test.go index daed76b..ac9c80a 100644 --- a/gossipsub_test.go +++ b/gossipsub_test.go @@ -1802,12 +1802,6 @@ func (iwe *iwantEverything) handleStream(s network.Stream) { topic := "test" err = w.WriteMsg(&pb.RPC{Subscriptions: []*pb.RPC_SubOpts{&pb.RPC_SubOpts{Subscribe: &truth, Topicid: &topic}}}) - remotePidBytes, err := s.Conn().RemotePeer().MarshalBinary() - if err != nil { - panic(err) - } - toPrune := []*pb.PeerInfo{{PeerID: remotePidBytes}} - var rpc pb.RPC for { rpc.Reset() @@ -1836,7 +1830,7 @@ func (iwe *iwantEverything) handleStream(s network.Stream) { // send a PRUNE for all grafts, so we don't get direct message deliveries var prunes []*pb.ControlPrune for _, graft := range rpc.Control.Graft { - prunes = append(prunes, &pb.ControlPrune{TopicID: graft.TopicID, Peers: toPrune}) + prunes = append(prunes, &pb.ControlPrune{TopicID: graft.TopicID}) } var iwants []*pb.ControlIWant