I am using golang-libp2p in my project where I am using Kadmelia DHT for peer discovery. I can access info of bootstrapped peers in the following manner.
import (
"github.com/libp2p/go-libp2p/core/peer"
)
for _, peerAddr := range dht.DefaultBootstrapPeers {
peerInfo, _ := peer.AddrInfoFromP2pAddr(peerAddr)
I can see as I keep adding new peers, peerInfo
list keeps on increasing, even after I restart the program. I am looking for a method to prune/remove existing bootstrapped peers. I have seen a pull request that talks about this issue but it seems like the method has not been included in the library. The link to the issue here.
Is it possible to prune bootstrapped peers in the golang implementation?