@@ -856,9 +856,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
856856 if err := msg .Decode (& vote ); err != nil {
857857 return errResp (ErrDecode , "msg %v: %v" , msg , err )
858858 }
859- // Mark the peer as owning the vote and process it
860- // because peer has 2 address sender and receive, so use p.id to find the right address
861- p = pm .peers .Peer (p .id )
862859 p .MarkVote (vote .Hash ())
863860
864861 exist , _ := pm .knownVotes .ContainsOrAdd (vote .Hash (), true )
@@ -878,10 +875,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
878875 if err := msg .Decode (& timeout ); err != nil {
879876 return errResp (ErrDecode , "msg %v: %v" , msg , err )
880877 }
881-
882- // Mark the peer as owning the timeout and process it
883- // because peer has 2 address sender and receive, so use p.id to find the right address
884- p = pm .peers .Peer (p .id )
885878 p .MarkTimeout (timeout .Hash ())
886879
887880 exist , _ := pm .knownTimeouts .ContainsOrAdd (timeout .Hash (), true )
@@ -902,9 +895,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
902895 if err := msg .Decode (& syncInfo ); err != nil {
903896 return errResp (ErrDecode , "msg %v: %v" , msg , err )
904897 }
905- // Mark the peer as owning the syncInfo and process it
906- // because peer has 2 address sender and receive, so use p.id to find the right address
907- p = pm .peers .Peer (p .id )
908898 p .MarkSyncInfo (syncInfo .Hash ())
909899
910900 exist , _ := pm .knownSyncInfos .ContainsOrAdd (syncInfo .Hash (), true )
0 commit comments