Skip to content

Commit fc87630

Browse files
committed
remove unused default_settings in rate limits
1 parent cd792f5 commit fc87630

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
@@ -110,10 +110,7 @@ def process_msg_and_check(
110110
]
111111
)
112112
else: # pragma: no cover
113-
log.warning(
114-
f"Message type {message_type} not found in rate limits (scale factor: {proportion_of_limit})",
115-
)
116-
limits = rate_limits["default_settings"]
113+
return f"(internal error) Message type {message_type} not found in rate limits"
117114

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

0 commit comments

Comments
 (0)