@@ -83,7 +83,7 @@ def process_msg_and_check(
83
83
rate_limits = get_rate_limits_to_use (our_capabilities , peer_capabilities )
84
84
85
85
try :
86
- limits : RLSettings = rate_limits [ "default_settings" ]
86
+ limits : RLSettings
87
87
if message_type in rate_limits ["rate_limits_tx" ]:
88
88
limits = rate_limits ["rate_limits_tx" ][message_type ]
89
89
elif message_type in rate_limits ["rate_limits_other" ]:
@@ -113,6 +113,7 @@ def process_msg_and_check(
113
113
log .warning (
114
114
f"Message type { message_type } not found in rate limits (scale factor: { proportion_of_limit } )" ,
115
115
)
116
+ limits = rate_limits ["default_settings" ]
116
117
117
118
if isinstance (limits , Unlimited ):
118
119
# this message type is not rate limited. This is used for
@@ -130,9 +131,9 @@ def process_msg_and_check(
130
131
if new_message_counts > limits .frequency * proportion_of_limit :
131
132
return " " .join (
132
133
[
133
- f"message count: { new_message_counts } "
134
- f"> { limits .frequency * proportion_of_limit } "
135
- f"(scale factor: { proportion_of_limit } )"
134
+ f"message count: { new_message_counts } " ,
135
+ f"> { limits .frequency * proportion_of_limit } " ,
136
+ f"(scale factor: { proportion_of_limit } )" ,
136
137
]
137
138
)
138
139
if len (message .data ) > limits .max_size :
0 commit comments