Skip to content

Commit 071a449

Browse files
committed
remove unused default_settings in rate limits
1 parent bb3d479 commit 071a449

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

chia/server/rate_limit_numbers.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ def compose_rate_limits(old_rate_limits: dict[str, Any], new_rate_limits: dict[s
6969
# Version 1 includes the original limits for chia software from versions 1.0 to 1.4.
7070
rate_limits = {
7171
1: {
72-
"default_settings": RLSettings(100, 1024 * 1024, 100 * 1024 * 1024),
7372
"non_tx_freq": 1000, # There is also a freq limit for many requests
7473
"non_tx_max_total_size": 100 * 1024 * 1024, # There is also a size limit for many requests
7574
# All transaction related apis also have an aggregate limit
@@ -181,7 +180,6 @@ def compose_rate_limits(old_rate_limits: dict[str, Any], new_rate_limits: dict[s
181180
},
182181
},
183182
2: {
184-
"default_settings": RLSettings(100, 1024 * 1024, 100 * 1024 * 1024),
185183
"non_tx_freq": 1000, # There is also a freq limit for many requests
186184
"non_tx_max_total_size": 100 * 1024 * 1024, # There is also a size limit for many requests
187185
"rate_limits_tx": {

chia/server/rate_limits.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,7 @@ def process_msg_and_check(
105105
]
106106
)
107107
else: # pragma: no cover
108-
log.warning(
109-
f"Message type {message_type} not found in rate limits (scale factor: {proportion_of_limit})",
110-
)
111-
limits = rate_limits["default_settings"]
108+
return f"(internal error) Message type {message_type} not found in rate limits"
112109

113110
if isinstance(limits, Unlimited):
114111
# this message type is not rate limited. This is used for

0 commit comments

Comments
 (0)