libp2p / go-libp2p-kbucket

A kbucket implementation for use as a routing table
MIT License
48 stars 35 forks source link

Reduce allocs in AddPeer #81

Closed aarshkshah1992 closed 4 years ago

aarshkshah1992 commented 4 years ago

@Stebalien For https://github.com/libp2p/go-libp2p-kad-dht/issues/594.

aarshkshah1992 commented 4 years ago

@Stebalien While I'm not really sure how much of an impact it will have, I've changed the code to use the least useful peer as it sounds like the right thing to do. Please take a look when you can !