From 02dbffa5d7ae064367ce2b89915a93e97744e3a6 Mon Sep 17 00:00:00 2001 From: yungwine Date: Sun, 28 Jan 2024 20:19:56 +0700 Subject: [PATCH] fix balancer archive request dispatching --- pytoniq/liteclient/balancer.py | 6 +++--- setup.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pytoniq/liteclient/balancer.py b/pytoniq/liteclient/balancer.py index ce3a383..4393aac 100644 --- a/pytoniq/liteclient/balancer.py +++ b/pytoniq/liteclient/balancer.py @@ -213,14 +213,14 @@ def _delete_unsync_peers(self): self._alive_peers.discard(i) async def execute_method(self, method_name_: str, *args, **kwargs) -> typing.Union[dict, typing.Any]: + only_archive = kwargs.pop('only_archive', False) + choose_random = kwargs.pop('choose_random', False) + for _ in range(self.max_retries): if not len(self._alive_peers): raise BalancerError(f'have no alive peers') - only_archive = kwargs.pop('only_archive', False) - choose_random = kwargs.pop('choose_random', False) - if only_archive and choose_random: raise BalancerError('Currently you cant execute method for both random and archive peer') diff --git a/setup.py b/setup.py index 3290da4..167314f 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="pytoniq", - version="0.1.27", + version="0.1.28", author="Maksim Kurbatov", author_email="cyrbatoff@gmail.com", description="TON Blockchain SDK",