-
Notifications
You must be signed in to change notification settings - Fork 197
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
Add new deny peer cache #1992
Add new deny peer cache #1992
Conversation
iulianpascalau
commented
Jun 22, 2020
- added a peer denial evaluator able to track black listed public keys beside peer IDs
…s beside peer IDs
// IsDenied returns true if the provided peer id is denied to access the network | ||
// It also checks if the provided peer id has a backing public key, checking also that the public key is not denied | ||
func (pde *peerDenialEvaluator) IsDenied(pid core.PeerID) bool { | ||
if pde.peerIdsCache.Has(pid) { |
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.
rename to blakcListIDsCache
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.
done
return false //no need to further search in the next cache, this is an unknown peer | ||
} | ||
|
||
return pde.publicKeysCache.Has(string(pkBytes)) |
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.
rename to blakcListedPublicKeysCache
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.
done
# Conflicts: # factory/networkComponents.go # process/interceptors/processor/hdrInterceptorProcessor.go # update/errors.go
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.
System tests passed.