-
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
Option to Reject requests by default #58
Conversation
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.
Looks good except one case where you're not unlocking.
@@ -217,18 +230,17 @@ func (rm *ResponseManager) executeQuery(ctx context.Context, | |||
peerResponseSender := rm.peerManager.SenderForPeer(p) | |||
selectorSpec := request.Selector() | |||
ha := &hookActions{false, request.ID(), peerResponseSender, nil} | |||
rm.requestHooksLk.RLock() | |||
for _, requestHook := range rm.requestHooks { | |||
requestHook.hook(p, request, ha) | |||
if ha.err != nil { | |||
return |
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.
Not unlocking.
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.
ha good catch
cover case where unlocking was not happening
f904432
to
0d82d29
Compare
Goals
Some graphsync operators may want to operate a graphsync node which is more locked down, rejecting all requests by default, and only authorizing requests through hooks.
Implementation