-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
only pass keys down newBlocks chan in bitswap #3271
Conversation
License: MIT Signed-off-by: Jeromy <[email protected]>
cc @Kubuxu for review |
@@ -308,12 +308,17 @@ func (bs *Bitswap) HasBlock(blk blocks.Block) error { | |||
return err | |||
} | |||
|
|||
// NOTE: There exists the possiblity for a race condition here. If a user |
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.
Can you create issue for that?
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.
Created: #3274
@@ -137,7 +137,7 @@ type Bitswap struct { | |||
|
|||
process process.Process | |||
|
|||
newBlocks chan blocks.Block | |||
newBlocks chan key.Key |
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.
Maybe rename to newKeys?
but current name also fits.
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.
Yeah, newBlocks still makes sense to me. I'm going to keep it as is
Two comments but generally LGTM |
should fix #3262 #3199 and #3246
License: MIT
Signed-off-by: Jeromy [email protected]