abstract-solana 0.0.2.86__py3-none-any.whl → 0.0.2.92__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of abstract-solana might be problematic. Click here for more details.
- abstract_solana/abstract_rpcs/rate_limiter.py +8 -11
- {abstract_solana-0.0.2.86.dist-info → abstract_solana-0.0.2.92.dist-info}/METADATA +1 -1
- {abstract_solana-0.0.2.86.dist-info → abstract_solana-0.0.2.92.dist-info}/RECORD +5 -5
- {abstract_solana-0.0.2.86.dist-info → abstract_solana-0.0.2.92.dist-info}/WHEEL +0 -0
- {abstract_solana-0.0.2.86.dist-info → abstract_solana-0.0.2.92.dist-info}/top_level.txt +0 -0
|
@@ -83,18 +83,15 @@ class RateLimiter(metaclass=SingletonMeta):
|
|
|
83
83
|
return {}
|
|
84
84
|
|
|
85
85
|
def is_all_limit(self, url, method):
|
|
86
|
-
|
|
87
|
-
|
|
86
|
+
if url == self.url1:
|
|
87
|
+
if method not in self.last_mb:
|
|
88
88
|
self.last_mb[method] = 0
|
|
89
|
-
|
|
90
|
-
if self.set_cooldown(url, method):
|
|
89
|
+
if self.set_cooldown(url, method):
|
|
91
90
|
print(f'set_cooldown for method {method} in {url} hit')
|
|
92
91
|
return True
|
|
93
92
|
|
|
94
93
|
# Clean up expired queries for the current URL
|
|
95
|
-
self.rate_limits[url] = [
|
|
96
|
-
query for query in self.rate_limits[url] if is_time_interval(query.get('time') or 0, 30)
|
|
97
|
-
]
|
|
94
|
+
self.rate_limits[url] = [query for query in self.rate_limits[url] if is_time_interval(query.get('time') or 0, 30)]
|
|
98
95
|
last_rate_limit = self.get_last_rate_limit(url)
|
|
99
96
|
|
|
100
97
|
# Check data size limits
|
|
@@ -112,14 +109,14 @@ class RateLimiter(metaclass=SingletonMeta):
|
|
|
112
109
|
print(f'time_rate {time_rate} of timerate limit 100 hit')
|
|
113
110
|
return True
|
|
114
111
|
|
|
115
|
-
|
|
112
|
+
method_specific_time_rate = [
|
|
116
113
|
query for query in time_rate if query['method'] == method
|
|
117
|
-
|
|
118
|
-
|
|
114
|
+
]
|
|
115
|
+
if len(method_specific_time_rate) > 40:
|
|
119
116
|
print(f'method_specific_time_rate {len(method_specific_time_rate)} of method_specific_time_rate limit 40 hit')
|
|
120
117
|
return True
|
|
121
118
|
|
|
122
|
-
|
|
119
|
+
return False
|
|
123
120
|
|
|
124
121
|
def log_response(self, method=None, response=None, retry_after=None):
|
|
125
122
|
method = method or 'default_method'
|
|
@@ -3,7 +3,7 @@ abstract_solana/abstract_rpcs/__init__.py,sha256=LIkUCWcuzUWVN1WjzcXjQ9Pl7cbcN8T
|
|
|
3
3
|
abstract_solana/abstract_rpcs/db_templates.py,sha256=sjdHfHIq9bO6VuDm3hwzn46NUrXXrGnB0knYNeVU7k8,29839
|
|
4
4
|
abstract_solana/abstract_rpcs/get_api_gui.py,sha256=OZ61HHb0gwdYjirwFFmnwk8z9x5np3cecCj9MdmuF8U,12372
|
|
5
5
|
abstract_solana/abstract_rpcs/get_body.py,sha256=UV85217q7mIpYOhVZdnzfmgZxD3QM0w0J0oevXyYtdE,51272
|
|
6
|
-
abstract_solana/abstract_rpcs/rate_limiter.py,sha256=
|
|
6
|
+
abstract_solana/abstract_rpcs/rate_limiter.py,sha256=TJgGKgQ50eo101eNmqYj1FF9Nbf7AxNmlE7HEVK4WUY,7251
|
|
7
7
|
abstract_solana/abstract_rpcs/solana_rpc_client.py,sha256=s-Mg0mDcDwjU3dm6nK_U6wWysaWTLoC4eXpSHbYsbyY,4132
|
|
8
8
|
abstract_solana/abstract_utils/__init__.py,sha256=HCbBVQ5BIFCVkFqqTMHp1Y__YQAO4HTq_KHVdMCe89U,296
|
|
9
9
|
abstract_solana/abstract_utils/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
|
|
@@ -20,7 +20,7 @@ abstract_solana/pump_functions/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4h
|
|
|
20
20
|
abstract_solana/pump_functions/buy_sell_pump.py,sha256=gjv_1et20s1Li0ygcURofO29VPkO1v-a5G5Bo_sZs_c,7860
|
|
21
21
|
abstract_solana/pump_functions/pump_fun_keys.py,sha256=BeWbV9_wd-c6ydF33drW-gZBDPWolbsMZL4cNhP3eOU,8537
|
|
22
22
|
abstract_solana/pump_functions/token_utils.py,sha256=O-Fgj3L1NhND-k4INa3WvLAEXg2N9u1fVqyLFzn1PwM,2714
|
|
23
|
-
abstract_solana-0.0.2.
|
|
24
|
-
abstract_solana-0.0.2.
|
|
25
|
-
abstract_solana-0.0.2.
|
|
26
|
-
abstract_solana-0.0.2.
|
|
23
|
+
abstract_solana-0.0.2.92.dist-info/METADATA,sha256=uUMEQ_13qj0EdcB-XSCC3gtjzboWA0NvFUDYG2OKLiY,981
|
|
24
|
+
abstract_solana-0.0.2.92.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
25
|
+
abstract_solana-0.0.2.92.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
|
|
26
|
+
abstract_solana-0.0.2.92.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|