mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-09 06:24:27 +00:00
revert change peer address change (#101)
This commit is contained in:
parent
bcffe1ec16
commit
35b964fc16
1 changed files with 0 additions and 10 deletions
|
|
@ -856,9 +856,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
||||||
if err := msg.Decode(&vote); err != nil {
|
if err := msg.Decode(&vote); err != nil {
|
||||||
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
||||||
}
|
}
|
||||||
// Mark the peer as owning the vote and process it
|
|
||||||
// because peer has 2 address sender and receive, so use p.id to find the right address
|
|
||||||
p = pm.peers.Peer(p.id)
|
|
||||||
p.MarkVote(vote.Hash())
|
p.MarkVote(vote.Hash())
|
||||||
|
|
||||||
exist, _ := pm.knownVotes.ContainsOrAdd(vote.Hash(), true)
|
exist, _ := pm.knownVotes.ContainsOrAdd(vote.Hash(), true)
|
||||||
|
|
@ -878,10 +875,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
||||||
if err := msg.Decode(&timeout); err != nil {
|
if err := msg.Decode(&timeout); err != nil {
|
||||||
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mark the peer as owning the timeout and process it
|
|
||||||
// because peer has 2 address sender and receive, so use p.id to find the right address
|
|
||||||
p = pm.peers.Peer(p.id)
|
|
||||||
p.MarkTimeout(timeout.Hash())
|
p.MarkTimeout(timeout.Hash())
|
||||||
|
|
||||||
exist, _ := pm.knownTimeouts.ContainsOrAdd(timeout.Hash(), true)
|
exist, _ := pm.knownTimeouts.ContainsOrAdd(timeout.Hash(), true)
|
||||||
|
|
@ -902,9 +895,6 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
|
||||||
if err := msg.Decode(&syncInfo); err != nil {
|
if err := msg.Decode(&syncInfo); err != nil {
|
||||||
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
return errResp(ErrDecode, "msg %v: %v", msg, err)
|
||||||
}
|
}
|
||||||
// Mark the peer as owning the syncInfo and process it
|
|
||||||
// because peer has 2 address sender and receive, so use p.id to find the right address
|
|
||||||
p = pm.peers.Peer(p.id)
|
|
||||||
p.MarkSyncInfo(syncInfo.Hash())
|
p.MarkSyncInfo(syncInfo.Hash())
|
||||||
|
|
||||||
exist, _ := pm.knownSyncInfos.ContainsOrAdd(syncInfo.Hash(), true)
|
exist, _ := pm.knownSyncInfos.ContainsOrAdd(syncInfo.Hash(), true)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue