Skip to content
This repository was archived by the owner on Feb 1, 2023. It is now read-only.
This repository was archived by the owner on Feb 1, 2023. It is now read-only.

Send cancel to peer when Session.GetBlock() is cancelled #253

@dirkmc

Description

@dirkmc

If a client calls Session.GetBlock() or Session.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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugA bug in existing code (including security flaws)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions