diff --git a/eth/handler.go b/eth/handler.go index 3978caa76f..10f1814be1 100644 --- a/eth/handler.go +++ b/eth/handler.go @@ -831,6 +831,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { 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()) pm.bft.Vote(&vote) case msg.Code == TimeoutMsg: @@ -840,6 +842,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } // 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()) pm.bft.Timeout(&timeout) case msg.Code == SyncInfoMsg: @@ -848,6 +852,8 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { 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()) pm.bft.SyncInfo(&syncInfo)