Simplify rate limiter constructor (#629)

This commit is contained in:
Jonathan Zernik 2021-01-12 20:21:47 -08:00 committed by GitHub
parent 42c19075ce
commit 24caaff56b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 6 deletions

View file

@ -238,8 +238,6 @@ def run_node(config):
)
squeak_rate_limiter = SqueakRateLimiter(
squeak_db,
blockchain_client,
lightning_client,
config.core.max_squeaks_per_address_per_hour,
)
squeak_whitelist = SqueakMemoryWhitelist(

View file

@ -12,13 +12,9 @@ class SqueakRateLimiter:
def __init__(
self,
squeak_db,
blockchain_client,
lightning_client,
max_squeaks_per_address_per_hour,
):
self.squeak_db = squeak_db
self.blockchain_client = blockchain_client
self.lightning_client = lightning_client
self.max_squeaks_per_address_per_hour = max_squeaks_per_address_per_hour
def should_rate_limit_allow(self, squeak):