Skip to content

Commit 35b964f

Browse files
authored
revert change peer address change (ethereum#101)
1 parent bcffe1e commit 35b964f

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

eth/handler.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)