Let’s say data is available with three nodes (n1, n2, n3) and our node(n4) wants to get the data of that file and is connected to all the three nodes(swarm connected).
But I don’t want to pull data from n1 even if I am connected and data is available.
Is there any way to achieve this?
You can use a connection filter to not connect them, or even just configure n4’s firewall to send REJECT when trying to connect to N1 ip + port (as well as when N1 connects to N4’s IPFS port + ip).
But that not really what you want since this just avoid making N1 and N4 be able to talk together.
in bitswap when the requesting node knows that it’s data is there with say 2 other nodes and I don’t want to pull data from one of the node and I know its peerID, then I can avoid it by skipping that request right ? In bitswap package?