Closed hannahhoward closed 3 years ago
Can we use the existing SetSendDontHaves option? https://github.com/ipfs/go-bitswap/pull/491/files#diff-9c62a707b27a6f011e3dab430c7920b8da5dc1a53c917cb7b2a32738dd77e98fR108
@dirkmc -- that controls sending out don't haves -- do we want to consider that the same behavior as simulating incoming don't haves?
Ah yes you're right - I got confused by the name of the method. Suggest renaming to SetSimulateDontHavesOnTimeout
done
Goals
fix #442
Implementation
The TestSessionWithPeers test was most commonly failing cause of a don't have timeout, which triggered simulated don't have message for all CIDs on the peer with content, which triggered a re-broadcast, causing peers with no content to receive additional wants.
This PR adds an option to not send these simulated don't have messages in tests.