go-bitswap
go-bitswap copied to clipboard
Remove inconsistent peers from Session
In the case where
- Bitswap sends want-have to a peer
- Peer responds HAVE
- Bitswap sends want-block to peer
- Peer responds DONT_HAVE
Remove the peer from the Session
Depends on https://github.com/ipfs/go-bitswap/issues/259
For context: this isn't necessarily malicious as the peer could have lost/removed the content. However, if that's the case, we probably don't want to ask them for anything in the session anyways. Regardless, if this was a mistake, we'll add them back later when we do a random broadcast.
Other thoughts: We might want to keep a badness score and permanently drop peers that keep doing this. But that's a future consideration.