vana
Advanced tools
+1
-1
| Metadata-Version: 2.3 | ||
| Name: vana | ||
| Version: 0.42.0 | ||
| Version: 0.43.0 | ||
| Summary: | ||
@@ -5,0 +5,0 @@ Author: Tim Nunamaker |
+1
-1
| [tool.poetry] | ||
| name = "vana" | ||
| version = "0.42.0" | ||
| version = "0.43.0" | ||
| description = "" | ||
@@ -5,0 +5,0 @@ authors = ["Tim Nunamaker <tim@vana.com>", "Volodymyr Isai <volod@vana.com>", "Kahtaf Alam <kahtaf@vana.com>"] |
+1
-1
@@ -18,3 +18,3 @@ # The MIT License (MIT) | ||
| __version__ = "0.42.0" | ||
| __version__ = "0.43.0" | ||
@@ -21,0 +21,0 @@ import rich |
@@ -22,2 +22,4 @@ from threading import Lock | ||
| Clear pending transactions by sending zero-value transactions with higher gas price. | ||
| Note: This method should be called within the context of _nonce_lock to prevent | ||
| concurrent clearing attempts from multiple threads. | ||
@@ -141,4 +143,12 @@ Args: | ||
| if max_pending_transactions > 0 and pending_count > max_pending_transactions: | ||
| vana.logging.warning(f"Found {pending_count} pending transactions (threshold: {max_pending_transactions}), attempting to clear...") | ||
| self._clear_pending_transactions() | ||
| # Use the existing nonce_lock to prevent multiple threads from clearing transactions simultaneously | ||
| with self._nonce_lock: | ||
| # Check again inside the lock in case another thread already cleared transactions | ||
| current_pending_count = (self.web3.eth.get_transaction_count(self.account.address, 'pending') - | ||
| self.web3.eth.get_transaction_count(self.account.address, 'latest')) | ||
| if current_pending_count > max_pending_transactions: | ||
| vana.logging.warning( | ||
| f"Found {current_pending_count} pending transactions (threshold: {max_pending_transactions}), attempting to clear..." | ||
| ) | ||
| self._clear_pending_transactions() | ||
@@ -145,0 +155,0 @@ retry_count = 0 |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
457857
0.16%12269
0.08%