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

Add peers returning recently requested blocks to sessions #235

Closed
Stebalien opened this issue Jan 11, 2020 · 3 comments
Closed

Add peers returning recently requested blocks to sessions #235

Stebalien opened this issue Jan 11, 2020 · 3 comments
Assignees
Labels
kind/bug A bug in existing code (including security flaws)

Comments

@Stebalien
Copy link
Member

Otherwise, we only add the first peer to return the block.

We may already do this, but I couldn't tell. Suggested by @olizilla.

@Stebalien Stebalien added the kind/bug A bug in existing code (including security flaws) label Jan 11, 2020
@Stebalien
Copy link
Member Author

(let's not put this into the mega patch, just keep it in mind for after we merge that)

@dirkmc
Copy link
Contributor

dirkmc commented Jan 13, 2020

On master, the keys for incoming blocks are passed to all sessions. The session checks if the keys are "interesting", meaning that the session has requested the corresponding blocks at some stage in the past (even if the session has since received the blocks). If the blocks are interesting the peer is added to the session.

In the PoC the SessionManager only notifies interested sessions of received blocks / HAVEs. The session adds the peers that sent those blocks. Session interest is cleared when the session ends.

@Stebalien
Copy link
Member Author

Ah, I see. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

No branches or pull requests

2 participants