-
Notifications
You must be signed in to change notification settings - Fork 38
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
Protect Libp2p Connections #229
Conversation
also uncovered a bug in early cancellations, resolved by using state pattern from requestmanager
afbd9d1
to
efc2c7a
Compare
graphsync.go
Outdated
@@ -14,6 +15,10 @@ import ( | |||
// RequestID is a unique identifier for a GraphSync request. | |||
type RequestID int32 | |||
|
|||
func (r RequestID) String() string { | |||
return strconv.Itoa(int(r)) |
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.
is this preferable to fmt.Sprintf("%d", r)
?
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.
should we have a namespace prefix to prevent potential tag collisions?
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.
yea I like that.
make tag for request IDs unique to graphsync
* refactor: simplify graphsync cancel * docs: add lock required comments to graphsync transport * feat: restore wait for complete in graphsync transport * feat: upgrade to graphsync v0.6.8
Goals
Protect libp2p connections in go-graphsync. fix #226
Implementation