Skip to content

Commit

Permalink
Revert "fix: utp send call to maintain nonce"
Browse files Browse the repository at this point in the history
This reverts commit c6aa362.
  • Loading branch information
GrapeBaBa committed Oct 11, 2024
1 parent 3297426 commit 8955d0b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
2 changes: 1 addition & 1 deletion p2p/discover/portal_protocol.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (p *PortalProtocol) setupUDPListening() error {
if id, ok := p.cachedIds[addr.String()]; ok {
//_, err := p.DiscV5.TalkRequestToID(id, addr, string(portalwire.UTPNetwork), buf)
req := &v5wire.TalkRequest{Protocol: string(portalwire.Utp), Message: buf}
p.DiscV5.sendFromAnotherThreadWithCall(id, netip.AddrPortFrom(netutil.IPToAddr(addr.IP), uint16(addr.Port)), req)
p.DiscV5.sendFromAnotherThread(id, netip.AddrPortFrom(netutil.IPToAddr(addr.IP), uint16(addr.Port)), req)

return len(buf), err
} else {
Expand Down
5 changes: 0 additions & 5 deletions p2p/discover/v5_udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -686,11 +686,6 @@ func (t *UDPv5) sendFromAnotherThread(toID enode.ID, toAddr netip.AddrPort, pack
}
}

func (t *UDPv5) sendFromAnotherThreadWithCall(toID enode.ID, toAddr netip.AddrPort, packet v5wire.Packet) {
resp := t.callToID(toID, toAddr, v5wire.TalkRequestMsg, packet)
defer t.callDone(resp)
}

// send sends a packet to the given node.
func (t *UDPv5) send(toID enode.ID, toAddr netip.AddrPort, packet v5wire.Packet, c *v5wire.Whoareyou) (v5wire.Nonce, error) {
addr := toAddr.String()
Expand Down

0 comments on commit 8955d0b

Please sign in to comment.