-
Notifications
You must be signed in to change notification settings - Fork 234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: Peers
into PeerSet
#1714
Conversation
5fe7608
to
091a09a
Compare
crates/p2p/src/main_loop.rs
Outdated
// TODO What do we need this for? | ||
pending_dials: HashMap<PeerId, EmptyResultSender>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This currently seems unused. We're keeping track of pending dials, but we use this information for nothing.
@CHr15F0x Do you know what this is about? Can I remove this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dead code 🔪
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my bad, it's actually used to match dial responses with commands since dialing is asynchronous 🤦
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Refactor the
Peers
type so it makes more sense. Make it so thatPeers
is the single source of truth for our peers. Add the newuseful
andevicted
flags needed by #1711.