Disable rate limiter in squeak controller (#947)

This commit is contained in:
Jonathan Zernik 2021-08-15 01:03:09 -07:00 committed by GitHub
parent af0e1f477c
commit cca4e4a6c7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,11 +70,11 @@ class SqueakController:
# Check if squeak is valid.
CheckSqueak(squeak, skipDecryptionCheck=True)
squeak_entry = self.squeak_core.validate_squeak(squeak)
# Check if rate limit is violated.
if not skip_rate_limit:
if not self.squeak_rate_limiter.should_rate_limit_allow(squeak):
raise Exception(
"Exceeded allowed number of squeaks per address per block.")
# TODO: Check if rate limit is violated.
# if not skip_rate_limit:
# if not self.squeak_rate_limiter.should_rate_limit_allow(squeak):
# raise Exception(
# "Exceeded allowed number of squeaks per address per block.")
# Save the squeak.
logger.info("Saving squeak: {}".format(
get_hash(squeak).hex(),