Skip to content

Commit

Permalink
fix balancer archive request dispatching
Browse files Browse the repository at this point in the history
  • Loading branch information
yungwine committed Jan 28, 2024
1 parent 3951dcc commit 02dbffa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions pytoniq/liteclient/balancer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pytoniq",
version="0.1.27",
version="0.1.28",
author="Maksim Kurbatov",
author_email="[email protected]",
description="TON Blockchain SDK",
Expand Down

0 comments on commit 02dbffa

Please sign in to comment.