This repository has been archived by the owner on Feb 1, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 112
Initial wantlist handling is racy #51
Labels
kind/bug
A bug in existing code (including security flaws)
Comments
I was specifically trying to avoid two way coupling between the WantManager and the PeerManager, since the WantManager already has a reference to the PeerManager to send messages. If we're going this route, I'd like to avoid that -- perhaps through SetDelegate similar to the one on bitswap Network |
What if we:
|
This was referenced Feb 1, 2019
hannahhoward
added a commit
that referenced
this issue
Feb 19, 2019
fix race conditions while setting up wantlists by creating peer queues on demand BREAKING CHANGE: PeerManager SendMessage signature changed fix #51
I believe this can also cause us to not cancel a want for a block. |
hannahhoward
added a commit
that referenced
this issue
Feb 20, 2019
fix race conditions while setting up wantlists by creating peer queues on demand BREAKING CHANGE: PeerManager SendMessage signature changed fix #51
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The race is as follows:
go-bitswap/bitswap.go
Lines 438 to 444 in 916de59
go-bitswap/peermanager/peermanager.go
Lines 158 to 170 in 916de59
In this last function,
initialEntries
will be missing the wantlist entry from step 3.The text was updated successfully, but these errors were encountered: