This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
Send cancel to peer when Session.GetBlock() is cancelled #253
Labels
kind/bug
A bug in existing code (including security flaws)
If a client calls
Session.GetBlock()
orSession.GetBlocks()
and then cancels the context, and the want has been sent to the peer, we should send a cancel to the peer.Currently we only remove the want from the pending wants (ie wants that have not yet been sent to the peer).
Note that we need to make sure that no other session wants the same block before we send a cancel. We should be able to check that by asking the
SessionInterestManager
.The text was updated successfully, but these errors were encountered: