#1279 closed defect (fixed)
i2psnark DHT: Speed up get_peers response when only one peer
Reported by: | zzz | Owned by: | zzz |
---|---|---|---|
Priority: | minor | Milestone: | 0.9.14 |
Component: | apps/i2psnark | Version: | 0.9.12 |
Keywords: | Cc: | ||
Parent Tickets: | Sensitive: | no |
Description
http://zzz.i2p/topics/1613 comment 4:
One thing I did notice was that when a node is considering building the reply to be sent to a get_peers, and the originator of the get_peers is removed from the reply set, if this results in there being zero replies left the node treats this as if it didn't have any values at all and returns a list of nodes.
List<Hash> peers = _tracker.getPeers(ih, MAX_WANT); peers.remove(nInfo.getHash()); // him if (peers.isEmpty()) { ...
For torrents that only have, say, one seed, this causes any get_peers calls done by the peer itself to take longer to terminate than needed as the peer will end up searching other nodes pointlessly. I would suggest that you instead reply with 0 peers to speed things up.
Subtickets
Note: See
TracTickets for help on using
tickets.
In 6677f8cd18a0d26436789ebd70c1ef092a8b5e7a i2p.i2p.zzz.test2 to be propped for 0.9.14